
March 26th, 2001, 04:10 AM
|
|
Contributing User
|
|
Join Date: Dec 2002
Posts: 14,578
  
Time spent in forums: < 1 sec
Reputation Power: 22
|
|
|
<i><b>Originally posted by : Mage (mage@baltnet.ru)</b></i><br />Hi,Muhammad!<br /><br />You can use client JavaScript for this:<br /><br /><html><br /><head><br /><script language="JavaScript"><br /><!--<br />function doDouble(a){<br />i=0;<br /> document.f1.field2.value = a;<br /> document.f1.field3.value = a + i;<br />i=i+1;<br /> document.f1.field4.value = a + i;<br />i=i+1;<br /> document.f1.field5.value = a + i;<br />i=i+1;<br /> document.f1.field6.value = a + i;<br />i=i+1;<br /> document.f1.field7.value = a + i;<br />}<br />//--><br /></script><br /></head><br /><body><br /><form action="" method="post" name="f1"><br /><input name="field1"><br><br /><input name="field2"><br><br /><input name="field3"><br><br /><input name="field4"><br><br /><input name="field5"><br><br /><input name="field6"><br><br /><input name="field7"><br><br /><input type="button" value="Duplicate" onclick="doDouble(field1.value)"><br><br /><input type="submit"><br /></form><br /></body><br /></html><br /><br />Or you can use form onsubmit="doDouble(f1.field1.value)"<br /><br />Best regards,<br />Mage<br /><br />------------<br />Muhammad at 2/13/2001 3:48:39 PM<br /><br /><br />Hello ,<br />Can someone please tell me how to copy a form field value into another field before I leave the page. I need to duplicate a value of one field to six other fields and add an additional character to each one. Rather than have the user input the same information seven times is there a way to duplicate the values. Thanx a million.
|