Click to See Complete Forum and Search --> : populate form Hell


fuxmyl
01-23-2003, 04:20 PM
I'm trying to use this script to populate a text field withina form.

href="javascript:document.formname.fieldname.value = 'text';void(0);"

the page is called quote_form.asp, the formname is quote and the fieldname is "terms"

I can't seem to make this work to save my life, is there anybody who can help me? If you would like to look at the page I'm working on, here is the link:

http://in.northern-tech.com/quote/quote_form.asp

the hyperlink I'm trying to use to populate is at the bottom of the page....PLEASE HELP ME!!

swon
01-23-2003, 04:42 PM
If I understood you correctly, this could do the trick:

Note: with javascript you can't get text from a txt-file

here some edits:

<!-- new link //-->
<A HREF="void()" onClick="document.FrontPage_Form1.terms.value = document.FrontPage_Form1.textcopy.value;return false">
Click Here</A> or fill incustom Terms</FONT> </TD>
<!-- End link //-->
<TD WIDTH="638">
<TEXTAREA NAME="terms" ROWS="3" COLS="60" TABINDEX="27"></TEXTAREA><br>
<!-- new hidden field--//-->
<textarea name=textcopy style="display:none">
! include here your textcopy.txt !
</textarea>
<!-- End of hidden field --//-->

hope it helps!

fuxmyl
01-23-2003, 05:09 PM
That did work, thank you very much!!