HighDots Forums  

On 'Submit' I see my hidden "Name" not the actual value

Javascript JavaScript language (comp.lang.javascript)


Discuss On 'Submit' I see my hidden "Name" not the actual value in the Javascript forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Stone
 
Posts: n/a

Default On 'Submit' I see my hidden "Name" not the actual value - 07-28-2003 , 11:36 PM






OK .. admittedly this is newbie dumb...
Its a JAVA script in a FORM

I have passed (successfully) the referring URL into my form
page on loading....

<script language="JavaScript"><!--
// THIS IS THE URL FROM THE REFERRERING PAGE!
var originalURL = unescape(location.search.substring(1));
//alert(originalURL ); // this works!
//--></script>

Now I just want to send this URL name from my form when submit
is pressed so I added this in my Form code.

<input type=hidden name=Referrer value="originalURL">

Now, ON submit I can send this hidden field, but it is always
arrives as
Referrer: originalURL
not the value I see in my alert ALERT test (i.e. the actual URL)

stupid huh... can anyone help me?

Thanks -stone






Reply With Quote
  #2  
Old   
Vjekoslav Begovic
 
Posts: n/a

Default Re: On 'Submit' I see my hidden "Name" not the actual value - 07-29-2003 , 02:56 AM






For example you could add simple JavaScript after HTML tag for your button
named Referrer:

document.forms[0].Referrer.value = originalURL;


"Stone" <x@y.com> wrote

Quote:
OK .. admittedly this is newbie dumb...
Its a JAVA script in a FORM

I have passed (successfully) the referring URL into my form
page on loading....

script language="JavaScript"><!--
// THIS IS THE URL FROM THE REFERRERING PAGE!
var originalURL = unescape(location.search.substring(1));
//alert(originalURL ); // this works!
//--></script

Now I just want to send this URL name from my form when submit
is pressed so I added this in my Form code.

input type=hidden name=Referrer value="originalURL"

Now, ON submit I can send this hidden field, but it is always
arrives as
Referrer: originalURL
not the value I see in my alert ALERT test (i.e. the actual URL)

stupid huh... can anyone help me?

Thanks -stone








Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.