View Full Version : How can i get the value from this form?

01-08-2008, 06:27 AM

i have a form which dynamically create another part of the form according to user requirement. but im facing problem to get the form field values. please help me to do it. my form is given below:




<meta content="">


<script language="javascript">

var counter = 0; // counter for naming the elements

function moreFields()



var newFields = document.getElementById('readroot').cloneNode(true);

newFields.id = '';

newFields.style.display = 'block';

var newField = newFields.childNodes;

for (var i=0;i<newField.length;i++)


var theName = newField[i].name



newField[i].name = theName + counter;

newField[i].id = theName + counter;



var insertHere = document.getElementById('writeroot');



// -->



<body onload="moreFields()">

<div id="readroot" style="display: none">
<div align="center">Job Experience <br>
<input type="text" name="company" size="70">
Post :
<input type="text" name="post" size="70">
Job Duties:
<textarea name="duties" cols="60" rows="10"></textarea>
<input type="button" value="Remove" style="font-size: 10px" onClick="this.parentNode.parentNode.removeChild(this.parentNode);">

<form method=post>

<span id="writeroot"></span>

<p class="hr">&nbsp;</p>

<input type="button" value="Add New Line" onClick="moreFields()"><br>

<input type="submit" value="Send form">




01-08-2008, 08:39 AM
How to get value from this form? (http://www.codingforums.com/showthread.php?t=130859) Your previous post may help!

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum