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

Discussion in 'Javascript' started by Stone, Jul 29, 2003.

  1. Stone

    Stone Guest

    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
     
    Stone, Jul 29, 2003
    #1
    1. Advertising

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

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


    "Stone" <> wrote in message
    news:RYlVa.225949$...
    > 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
    >
    >
    >
    >
    >
     
    Vjekoslav Begovic, Jul 29, 2003
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Stone
    Replies:
    1
    Views:
    374
    Joerg Gippert
    Jul 29, 2003
  2. Smokey Grindle
    Replies:
    0
    Views:
    348
    Smokey Grindle
    Jun 25, 2006
  3. Hellmut Weber

    Accessing the name of an actual parameter

    Hellmut Weber, Jan 26, 2010, in forum: Python
    Replies:
    1
    Views:
    266
    Alf P. Steinbach
    Jan 26, 2010
  4. Rick
    Replies:
    3
    Views:
    8,347
    Alexey Smirnov
    Apr 13, 2010
  5. Matt Herson
    Replies:
    8
    Views:
    383
    Matt Herson
    Sep 30, 2003
Loading...

Share This Page