Jump to content

Determined whether dynamic Javascript textboxes were created using PHP


qwerty234

Recommended Posts

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?

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.