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

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Stone

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

    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="JavaS cript"><!--
    // THIS IS THE URL FROM THE REFERRERING PAGE!
    var originalURL = unescape(locati on.search.subst ring(1));
    //alert(originalU RL ); // 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="original URL">

    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

    #2
    Re: On 'Submit' I see my hidden &quot;Name&quot ; not the actual value

    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 in message
    news:RYlVa.2259 49$ye5.37700561 @news4.srv.hcvl ny.cv.net...[color=blue]
    > 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="JavaS cript"><!--
    > // THIS IS THE URL FROM THE REFERRERING PAGE!
    > var originalURL = unescape(locati on.search.subst ring(1));
    > //alert(originalU RL ); // 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="original URL">
    >
    > 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
    >
    >
    >
    >
    >[/color]


    Comment

    Working...