Problems passing multiple variables with javaScript

Discussion in 'Javascript' started by brianwmunz@gmail.com, Feb 18, 2005.

  1. Guest

    Hi, I'm having a problem passing a variable through a URL because the
    variable is supposed to hold a URL that has a variable of its own.
    Here is an idea of what I'm trying to do:
    href="javascript:
    newWin('/vcrc/exitvcrc.jhtml&newURL=http://www.something.net/default.asp?sponID=ETC','NowLeaving','420',
    '200', 'no', 'auto','no');"
    So, pretty much, the page I'm sending the variable to think there's two
    variables (newURL and sponID), but sponID is part of the URL.
    I'm hoping this is an easy question.
    Any help would be appreciated.
    Thanks.
    Brian Munz
    , Feb 18, 2005
    #1
    1. Advertising

  2. Guest

    Actually, the correct URL is
    href="javascript:newWin('/vcrc/exitvcrc.jhtml?newURL=http://www.something.net/default.asp?sponID=ETC','NowLeaving','420',
    '200', 'no', 'auto','no');"
    , Feb 18, 2005
    #2
    1. Advertising

  3. Randy Webb Guest

    wrote:

    > Hi, I'm having a problem passing a variable through a URL because the
    > variable is supposed to hold a URL that has a variable of its own.
    > Here is an idea of what I'm trying to do:
    > href="javascript:
    > newWin('/vcrc/exitvcrc.jhtml&newURL=http://www.something.net/default.asp?sponID=ETC','NowLeaving','420',
    > '200', 'no', 'auto','no');"


    http://jibbering.com/faq/#FAQ4_24

    > So, pretty much, the page I'm sending the variable to think there's two
    > variables (newURL and sponID), but sponID is part of the URL.


    Escape the ?, the = sign or have the exitvcrc.jhtml page do a re-direct
    to the appropriate destination and change the way you pass the variables.

    --
    Randy
    comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
    Randy Webb, Feb 19, 2005
    #3
    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. Roy
    Replies:
    1
    Views:
    1,276
  2. Replies:
    9
    Views:
    931
  3. Gung Ho
    Replies:
    2
    Views:
    134
    Fatbob
    Nov 28, 2003
  4. Jack
    Replies:
    5
    Views:
    144
  5. zig
    Replies:
    12
    Views:
    262
    kaeli
    Jan 29, 2004
Loading...

Share This Page