I want to create a invisible form anywhere into a HTML page dynamically using JavaScript and then submit automatically.
I want to create the form given below:
var myform = document.createElement("form");
product = document.createElement("input");
product.value = JSProduct;
product.name = "Product";
myform.action = "myForm.aspx";
myform.method = "post";
form1.appendChild(product);
document.body.appendChild(form1);
form1.submit();
This will create a form and which has a child element product ("Input type") you have to append child element to parent element like product to form and form to DOM root elemnt body and document and you can add atribut of the form as action and method this will do your thing.