vidyashankara Posted July 20, 2006 Share Posted July 20, 2006 I have this function on my php script..[code]echo "function add() {var i =1;var txt = \"SEGID : <select name='segid[]'>";for ($i=0; $i<count($atm); $i++) {echo "<option value='PRO$atm[$i]'>PRO$atm[$i]";}echo "</select>\";txt +=\" Residue : <select name='resi[]'> <option value=ASP>ASP <option value=GLU>GLU <option value=LYS>LYS </select>\";txt +=\" Residue ID : <input type='text' name='resid[]' + i><br>\";document.getElementById('prot').innerHTML += txt;}";[/code]This function adds a set of text boxes everytime you click a button. The problem is, when you click on the button the second time, the values in the first set of text boxes gets reset and i gotta enter them again. is there anyway to prevent that? Quote Link to comment https://forums.phpfreaks.com/topic/15157-javascript-with-php/ Share on other sites More sharing options...
trq Posted July 20, 2006 Share Posted July 20, 2006 There is a seperate forum for client side issues, I suggest you post this there. Quote Link to comment https://forums.phpfreaks.com/topic/15157-javascript-with-php/#findComment-61060 Share on other sites More sharing options...
vidyashankara Posted July 20, 2006 Author Share Posted July 20, 2006 Thanks! Will do :) Quote Link to comment https://forums.phpfreaks.com/topic/15157-javascript-with-php/#findComment-61072 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.