kadamsurekha Posted May 15, 2007 Share Posted May 15, 2007 hello friends! i have a query here with ajax and php i have a page where i want to show records based on no. selected like i have a drop down list which allows to select the no: like 1,2,3,4,5 so if user selects 1 he should get 1 textbox displayed down if user selects 2 he should get 2 textboxes displayed and so on i m not understanding the code how to write for this to work i hav written it as follows: <html> <head> <script language="javascript"> function chkselect() { rows = document.ninvites.options[selectedIndex].value; if(rows==1) { document.getElementById.Layer1.innerHTML="<input type=text name=s1>"; } } </script> <body> <div id="Layer1"> ENTER NO OF INVITATIONS: <select name="ninvites" onchange="javascript:chkselect();"> <option value="1">1</option> <option value="2">2</option> <option value="3">3</option> <option value="4">4</option> <option value="5">5</option> </select> </div> </body> </html> i want the textboxes to get displayed below the dropdown list. can any1 help me in this?????????????? Link to comment https://forums.phpfreaks.com/topic/51445-easy-query/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.