[Javascript] RE: javascript variable into form element

Alan Easton alan.easton at unn.ac.uk
Wed Aug 6 09:12:44 CDT 2003


Yeah, thanks JR.....this got it working......

>  -----Original Message-----
> From: 	J.R. Pitts [mailto:listuser at wjponline.com] 
> Sent:	06 August 2003 15:01
> To:	[JavaScript List]
> Subject:	[Javascript] RE: javascript variable into form element
> 
> Have you tried
> 
> document.your_form_name.your_form_element_name.value=referer
> 
> ?
> 
> J.R. Pitts
> http://www.wjponline.com
> 
> 
> 
> 	 -----Original Message-----
> 	From: 	javascript-bounces at LaTech.edu
> [mailto:javascript-bounces at LaTech.edu]  On Behalf Of Alan Easton
> 	Sent:	Wednesday, August 06, 2003 5:02 AM
> 	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: ATT00014.txt >>  << File: ATT20403.txt >> 


More information about the Javascript mailing list