Note that there are some explanatory texts on larger screens.

plurals
  1. POBootstrap Nod Validation Plugin And Iframs
    primarykey
    data
    text
    <p>I'm using bootstrap-wysihtml5 editor on my form which creates iframe element.</p> <pre><code>&lt;iframe class="wysihtml5-sandbox" width="0" height="0" frameborder="0" security="restricted" allowtransparency="true" marginwidth="0" marginheight="0" name="for_nod" src="#" style="display: inline-block; background-color: rgb(255, 255, 255); border-collapse: separate; border-color: rgb(204, 204, 204); border-style: solid; border-width: 1px; clear: none; float: none; margin: 0px 0px 10px; outline: 0px none rgb(0, 0, 0); outline-offset: 0px; padding: 4px 6px; position: static; top: auto; left: auto; right: auto; bottom: auto; z-index: auto; vertical-align: middle; text-align: start; -moz-box-sizing: content-box; box-shadow: 0px 1px 1px 0px rgba(0, 0, 0, 0.075) inset; border-radius: 4px 4px 4px 4px; width: 750px; height: 300px;"&gt; &lt;html&gt; &lt;head&gt; &lt;meta charset="UTF-8"&gt; &lt;link href="/js/plug-ins/bootstrap-wysihtml5/rtl/rtl-editor.css" rel="stylesheet"&gt; &lt;style type="text/css"&gt; &lt;/head&gt; &lt;body class="wysihtml5-editor" contenteditable="true" spellcheck="true" style="background-color: rgb(255, 255, 255); color: rgb(85, 85, 85); cursor: text; font-family: "Helvetica Neue",Helvetica,Arial,sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; line-height: 20px; letter-spacing: normal; text-align: start; text-decoration: none; text-indent: 0px; text-rendering: optimizelegibility; word-break: normal; word-wrap: break-word; word-spacing: 0px;"&gt; simple text &lt;br&gt; &lt;/body&gt; &lt;/html&gt; &lt;/iframe&gt; </code></pre> <p>I need to validate that body element inside the iframe isn't empty using Nod validation plugin.</p> <p>the problem is that Nod validation plugin accepts jquery selectors TEXT for setting validation rules for elements , NOT objects - I can get the iframe object using $("iframe").content().find("body") but the validation logic will not work.</p> <p>I have tried to set submit button <em>onclick</em> event handler to handle the validation of the iframe manually , the problem was that if the rules used by Nod passes ,then the custom validation function will have no effect if it returned true or false values.</p> <p>anyway to get around this issue? </p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload