jquery - Fetch value of Dynamic textbox in javascript -


i dynamically creating textbox @ runtime using javascript , passing value servlet page using href(which created @ run time along textbox) somehow value being passed "null". not understanding why..can me on ??

here javascript code :

//here creating textbox var td1 = document.createelement("td"); var strhtml1 = "<input type=\"text\" name=\"in_name\" id =\"in_nm\" size=\"18\"  style=\"height:24;border: 1 solid;margin:0;\">"; td1.innerhtml = strhtml1.replace(/!count!/g, count);  //here fetching value var nm=document.getelementbyid("in_nm");//this value being passed null  //here passing through href tag  var strhtml3 = "<a id=\"link\" href=\"userhandler?action=insert&&name="+nm+"\">add row</a>"; td3.innerhtml = strhtml3.replace(/!count!/g, count); var dt=document.getelementbyid('in_dt'); 

you never put html string document, can't fetch document.


Comments

Popular posts from this blog

database - VFP Grid + SQL server 2008 - grid not showing correctly -

jquery - Set jPicker field to empty value -

.htaccess - htaccess convert request to clean url and add slash at the end of the url -