qwerty234 Posted April 27, 2007 Share Posted April 27, 2007 I create dynamic text boxes using the following Javascript code: function addMaterial() { var ni = document.getElementById('myDiv'); var numi = document.getElementById('theValue'); var num = (document.getElementById("theValue").value -1)+ 2; numi.value = num; var divIdName = "my"+num+"Div"; var newdiv = document.createElement('div'); newdiv.setAttribute("id",divIdName); newdiv.innerHTML = "<input name='material" + num + "' type='text' id='material" + num + "'> <a href=\"javascript:;\" onclick=\"removeEvent(\'"+divIdName+"\')\">Remove the material</a>"; ni.appendChild(newdiv); } On POST, how can I, in PHP. determine the content of the dynamic text boxes created. Or would I have to use Javascript again? Quote Link to comment https://forums.phpfreaks.com/topic/49018-determined-whether-dynamic-javascript-textboxes-were-created-using-php/ Share on other sites More sharing options...
MadTechie Posted April 27, 2007 Share Posted April 27, 2007 use javascript to send it via get or post, or store in cookies Quote Link to comment https://forums.phpfreaks.com/topic/49018-determined-whether-dynamic-javascript-textboxes-were-created-using-php/#findComment-240124 Share on other sites More sharing options...
taith Posted April 27, 2007 Share Posted April 27, 2007 you should be able to access it through material1(num)... no? try print_r($_POST); see if the data is coming through :-) Quote Link to comment https://forums.phpfreaks.com/topic/49018-determined-whether-dynamic-javascript-textboxes-were-created-using-php/#findComment-240125 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.