Note that there are some explanatory texts on larger screens.

plurals
  1. POAdd IpRange value to input dynamically
    primarykey
    data
    text
    <p>I want to add an input field the user can enter/modify an IP Address in the format 198.162.0.0/45 representing a range from 198.162.0.0 - 198.162.0.45</p> <p>what I have almost works but its not allowing the complete correct format. If I enter any of the following it works fine. 198/45, 198.168, or 198.168.0.45</p> <p>but as soon as I try to add 198.168.0/24 or 198.168.0.0/24</p> <p>I wanted to be able to add 198.168.0.0/24 without having to breakup the fields but if I have to I can.</p> <p>it gets a scripting error when my dynamic element is appended to the div tag containing the input fields.</p> <p>basically my setup is this, empty div tag I will append the following to. The newIpRange comes in as a string such as 198.168.0.0/24 EDIT with test html that produces the issue</p> <pre><code>&lt;html&gt; &lt;head&gt; &lt;title&gt;Test IP&lt;/title&gt; &lt;script type="text/javascript"&gt; function onload(range){ var e = document.getElementById("_main"); e.innerHTML = getTag(range); } function getTag(range){ return "&lt;div class='input-append' &gt;&lt;input type='text' value='" + range + "' &gt;&lt;/input&gt;&lt;div&gt;"; } &lt;/script&gt; &lt;/head&gt; &lt;body onload="onload(198.168.1.0/24);"&gt; &lt;div id="_main" &gt; &lt;/div&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>what would be causing this? of interest to me really is why does it give the error in some cases, not others</p> <p>Here is the Error I'm getting from the script when I appent this line: SCRIPT1006: Expected ')'</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.
 

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