javascript - how to use split() function in classic ASP for mass inputs textbox? -


i trying use split function in classic asp using javascript. need have big text box can keep group of bar-code numbers of products. once submit button clicked these bar-code numbers needed split each , every character term bar-code numbers (in loop). instance, if have 5 bar-code numbers, have split first bar-code number each , every character/number, keep array , continue same process 5 bar-code numbers. wanted display result of split-ted numbers paragraph myself check if working. below code working on. doesn't show me when click button. not being able figure out logical error or missing. how fix it? didn't find helpful solution when doing research.

    <p id="demo"></p>          <form name="submitticket" action="<%=request("script_name")%>" method="post">             <input type="hidden" name="action" value="sendform">             <table cellpadding="0" cellspacing="0" border="0" width="100%">                 <tr>                     <td align="center" colspan="2">                         <br /><textarea name="noskews" id="skewsip" rows="50" cols="100" wrap="soft" maxlength="5000"><%=request("noskews")%></textarea>                      </td>                 </tr>                 <tr>                     <td align="center" colspan="2" style="padding-top:20px;">                     <input type="submit" name="clearnoskew" value="submit" class="a-t-button-mini">                     </td>                 </tr>             </table>         </form>      <script>         $("form").on("click", ".a-t-button-mini", function(event){           //var clickedid = $(this).attr('value')+','; // give me first numbers,           var locationbtn = $('#skewsip'); // select input           var locationbtnvalue = $('#skewsip').val(); // take select value           var ids = locationbtnvalue.split(',');            document.getelementbyid("demo").innerhtml = ids; //want display in paragraph myself         });     </script> 

i able split 1 barcode (out of total 5 barcodes entered inside textarea) every characters , display div. example: entered 5465 8989 7586 5236 5486 (these barcodes entered using "enter or new line" after every 4 numbers; space in above example means next barcode in next line). split output of (5,4,6,5) need didn't give me rest of barcodes. in other words, couldn't same 5 total bar codes entered textarea/textbox. know "for loop" when kept loop in code, executes first barcode out of 5 barcodes.

<script> $("#form").on("click",".a-t-button-mini", function(event){     var locationbtnvalue = $('#skewsip').val();     var skews_array = locationbtnvalue.split("",12);      // (i = 0; < locationbtnvalue.length; i++) {     //      text += skews_array[i] + "<br>";          document.getelementbyid("test").innerhtml = skews_array;        //  }     }); </script> 

Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -