How to pass value via form?
I want to pass a value via form which is generatet like this: for(var x=0; x<modulsArr.length ; x++){ var modulFormElement=document.createElement("FORM"); modulFormElement.action="lessons.php"; modulFormElement.methode="POST"; var modulInput=document.createElement("INPUT"); modulInput.value=modulsArr[x]; // gibt den wert des ausgewählten moduls weiter modulInput.name="modul"; modulInput.type="HIDDEN"; var p = document.createElement("p"); var div=document.createElement("div"); var ifra=document.createElement("iframe"); var node = document.createTextNode(modulsArr[x]+" Modul"); //adding the text to the paragraph p.appendChild(node); div.appendChild(p); div.setAttribute("class", "margin"); div.style.marginLeft="10%"; div.style.backgroundColor="white"; p.style.color="royalblue"; p.style.fontSize="16pt"; div._modulData= moduls[x]; div.appendChild(ifra); div.addEventListener("click", itemClickHandler, false); //fügt submit modulFormElement.appendChild(div); modulFormElement.appendChild(modulInput); el.appendChild(modulFormElement); }