[Javascript] RE: javascript variable into form element
Alan Easton
alan.easton at unn.ac.uk
Thu Aug 7 02:38:21 CDT 2003
Yeah, got it in the end. Thanks Peter...
-----Original Message-----
From: Peter Brunone [mailto:peter at brunone.com]
Sent: 06 August 2003 17:07
To: '[JavaScript List]'
Subject: [Javascript] RE: javascript variable into form element
<form name="mainForm">
<input type="text" name="formurl" size="30">
</form>
<script language=javascript>
var referer = window.opener.document.location.href;
document.mainForm.formurl.value = referer;
</script>
Cheers,
Peter
-----Original Message-----
From: javascript-bounces at LaTech.edu On Behalf Of Alan Easton
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...
_______________________________________________
Javascript mailing list
Javascript at LaTech.edu
https://lists.LaTech.edu/mailman/listinfo/javascript
More information about the Javascript
mailing list