
Hai Every Dynamic's
We can't write JavaScript code in Ajax Response Code.Why because it takes only html,json,xml response.I tried a lot to create js form in ajax response.It's not working.rather than that i try to created on innerHtml document.
here:sName is the id of the particular text box...
var s="";
s=s+"<form method='post' name='updateForm'><table border='1'><tr><td>StudentName</td><td>StudentAge</td><td>StudentDept</td></tr><tr><td><input type='text' name='v1' id='v1' value='"+document.getElementById('sName'+r).value+"'></td><td><input type='text' name='v2' id='v2' value="+document.getElementById('sAge'+r).value+" onKeyup='isInteger(this.value)'></td><td><input type='text' name='v3' id='v3' value='"+document.getElementById('sDept'+r).value+"'></td></tr><tr><td colspan=1>modify details</td><td><input type='button' value='Save' onclick='doValidate()'></td><td><input type='button' value='Cancle' onClick='clearMe()'></td></table></form><div name='str' id='str' style ='width:22em;border:1px black solid;padding-left:2px;padding-right:2px; visibility: hidden'></div>";
>
> **document.getElementById("str").innerHTML=s;**
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.