Click to See Complete Forum and Search --> : Dynamic Forms & Input


cupcake
06-05-2005, 04:14 AM
Hi, I am a newbie at this, so any help would be greatly appreciated!

I have to create a web based form using Dreamweaver. The form requires the user to add additional entries by clicking on a 'Add new Record' button. When this happens, I need all the existing data which was just added to still remain on screen and then the user can enter in the next record.

I have no idea where to begin, I've searched and searched. No luck. I am quite able to develop your basic form but this dynamic input is becoming a bit confusing.

Can anybody please send me a basic script on this or point me in the right direction.

Cheers :confused:
Jacqui

BigMoosie
06-05-2005, 04:46 AM
Does this help?<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<HTML lang="en">
<HEAD>
<TITLE>HTML</title>
<META http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<META name="Content-Script-Type" content="text/javascript">
<META name="Content-Style-Type" content="text/css">
</HEAD>
<BODY>

<FORM name="dynamic">
<DIV>
<INPUT type="text" name="entry">
<INPUT type="submit" value="Add entry">
</DIV>
<HR>
<DIV id="output">
</DIV>
</FORM>

<SCRIPT type="text/javascript">
<!--
document.forms.dynamic.onsubmit=function(){
var a=document.createTextNode(document.forms.dynamic.entry.value);
var b=document.createElement("BR");
document.getElementById("output").appendChild(a);
document.getElementById("output").appendChild(b);
return false;
}
-->
</SCRIPT>

</BODY>
</HTML>