Pass multiple parameters into page's querystring property from jscript

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.
 
M

moondaddy

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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,576
Members
45,054
Latest member
LucyCarper

Latest Threads

Top