Pass multiple parameters into page's querystring property from jscript

Discussion in 'ASP .Net' started by moondaddy, Feb 28, 2004.

  1. moondaddy

    moondaddy Guest

    This is a basic question but I cant seem to find the answer anywhere and
    have never tried it before.

    Here's one of many syntax I'm trying, but should at least show you what I'm
    trying to do:

    parent.data.frameElement.src="data.aspx?Task=CartAddNew & sku=" + ItemSku;

    where there's 2 parameters, Task and sku, and I'm trying to pass a text
    value of "CartAddNew" to the Task parameter and a value from the ItemSku
    variable to the sku parameter.

    Thanks.

    --
     
    moondaddy, Feb 28, 2004
    #1
    1. Advertisements

  2. moondaddy

    moondaddy Guest

    I found the answer in another posting when I searched on "Pass"

    The correct way to separate the 2 parameters and their value assignments is
    with a & and no spaces on each side. I had tried it with a space on each
    side which made it fail. Here's what worked for me:

    parent.data.frameElement.src="data.aspx?Task=CartAddNew&sku=" + sku;

    refer to my post below for clarification on the value assignments.

    --

    "moondaddy" <> wrote in message
    news:%23C96wii$...
    > This is a basic question but I cant seem to find the answer anywhere and
    > have never tried it before.
    >
    > Here's one of many syntax I'm trying, but should at least show you what

    I'm
    > trying to do:
    >
    > parent.data.frameElement.src="data.aspx?Task=CartAddNew & sku=" + ItemSku;
    >
    > where there's 2 parameters, Task and sku, and I'm trying to pass a text
    > value of "CartAddNew" to the Task parameter and a value from the ItemSku
    > variable to the sku parameter.
    >
    > Thanks.
    >
    > --
    >
    >
    >
     
    moondaddy, Feb 28, 2004
    #2
    1. Advertisements

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. Jon Maz
    Replies:
    4
    Views:
    1,402
    Jon Maz
    Sep 9, 2004
  2. Maxwell2006
    Replies:
    5
    Views:
    2,529
    Steven Cheng[MSFT]
    Mar 7, 2006
  3. Gordowey
    Replies:
    1
    Views:
    5,651
    jacky kwok
    Mar 11, 2006
  4. psycho
    Replies:
    1
    Views:
    416
    Manish
    Mar 31, 2008
  5. Jessica
    Replies:
    2
    Views:
    249
    Roland Hall
    Apr 9, 2004
Loading...

Share This Page