Help with Querystring

I have a function that I'm calling on clicking the done button


My actual function is as follows:

function goNext() {

window.top.location.href='/onlinelearning/trnmnu.asp' + location.search + '&moveForward=1'

}


If I view the properties of the page that the button is now opening, the URL is: /onlinelearning/trnmnu.asp&moveForward=1

It should be something like: /onlinelearning/trnmnu.asp?roleid=909&caseid=1723&presid=8907&moveForward=1


The querystring (?roleid=909&caseid=1723&presid=8907) is only available on the first page of the title because on Next, Lectora loads a separate page. I need to be able to capture the "?roleid=909&caseid=1723&presid=8907" in a variable and then pass that variable back into the function when the user reaches the last page and they click the Done button.


I'm thinking an action:

On: Show

Action: Modify Variable

Target: QueryLocation

Value: ?

Modifcation: Set Variable Contents


Done button function:

Action: Go To

Target: Web Address

Web Address: javascript:goNext(QueryLocation)


Header Script Function:

function goNext() {

window.top.location.href='/onlinelearning/trnmnu.asp' + QueryLocation + '&moveForward=1'

}

}

Would something like this work?

Where do I establish "QueryLocation" as a variable? I have a function that I'm calling on clicking the done button


My actual function is as follows:

function goNext() {

window.top.location.href='/onlinelearning/trnmnu.asp' + location.search + '&moveForward=1'

}


If I view the properties of the page that the button is now opening, the URL is: /onlinelearning/trnmnu.asp&moveForward=1

It should be something like: /onlinelearning/trnmnu.asp?roleid=909&caseid=1723&presid=8907&moveForward=1


The querystring (?roleid=909&caseid=1723&presid=8907) is only available on the first page of the title because on Next, Lectora loads a separate page. I need to be able to capture the "?roleid=909&caseid=1723&presid=8907" in a variable and then pass that variable back into the function when the user reaches the last page and they click the Done button.


I'm thinking an action:

On: Show

Action: Modify Variable

Target: QueryLocation

Value: ?

Modifcation: Set Variable Contents


Done button function:

Action: Go To

Target: Web Address

Web Address: javascript:goNext(QueryLocation)


Header Script Function:

function goNext() {

window.top.location.href='/onlinelearning/trnmnu.asp' + QueryLocation + '&moveForward=1'

}

}

Would something like this work?

Where do I establish "QueryLocation" as a variable?

Discussions have been disabled for this post