Pass multiple parameters into page's querystring property from jscript

  • Thread starter Thread starter moondaddy
  • Start date Start date
M

moondaddy

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.
 
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.
 
Back
Top