[Javascript] RE: javascript variable into form element
Smitha Ramaswamy
smitha.ramaswamy at wipro.com
Wed Aug 6 04:18:13 CDT 2003
Just use the document.writeln in your javascript once again:
document.writeln("<input type='text' name='formurl' size='30' value =' " + referer + " ' " >");
Smitha.
> -----Original Message-----
> From: javascript-bounces at LaTech.edu [mailto:javascript-bounces at LaTech.edu] On Behalf Of Alan Easton
> Sent: Wednesday, August 06, 2003 2:32 PM
> To: 'Java-List'
> Subject: javascript variable into form element
>
> Hello People,
>
> I assume this is easy, but I cannot figure it out. I have the following javascript that return a variable with a value.
>
> <script language=javascript>
> var referer = window.opener.document.location.href;
> document.write(referer);
> </script>
>
> Quite simple, it gets the value and writes it to the browser.
>
> But I would like it written to a form element.
>
> <form>
> <input type="text" name="formurl" size="30">
> </form>
>
> What is the easiest way of getting that javascript variable into that form element....????
>
> I have tried, but I cannot see it.
>
> Any help would be appreciated.
>
> Thanks,
>
> Alan... << File: ATT175266.txt >>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.evolt.org/pipermail/javascript/attachments/20030806/85715f22/attachment.htm>
More information about the Javascript
mailing list