javaScript Beginner: Sending data from java-script to servlet?
<p>I am creating dynamic form in JavaScript. I want to send the data's from JavaScript to servlet. I dont use any submit Button in my Form.Using button only i want to send the data's. Anyone help me please.</p>

<p>This is my code:</p>

<pre><code>var myform=document.createElement("form");
myform.setAttribute("id", "myform");

var tname=document.createElement('input');
tname.setAttribute('type','text');
tname.setAttribute('name', "name");

var leaveMessage=document.createElement('input');
leaveMessage.setAttribute('type','button');
leaveMessage.setAttribute('name', "msgButton");
leaveMessage.setAttribute('value', "Leave Message");

myform.appendChild(tname);
myform.appendChild(leaveMessage);

document.body.appendChild(myform);
</code></pre>
