Millisecond Forums

Pass value from script to url

https://forums.millisecond.com/Topic23134.aspx

By francescodf - 12/19/2017

Hi there,

Is it possible to pass a value of the script as an output parameter via url?

For example I would like to return a parameter d of the iat test at the end of the script http://example.com?dparam=XXXX

Is it also possible to pass these values as POST instead of GET?

Thank you
By Dave - 12/20/2017

francescodf - Wednesday, December 20, 2017
Hi there,

Is it possible to pass a value of the script as an output parameter via url?

For example I would like to return a parameter d of the iat test at the end of the script http://example.com?dparam=XXXX

Is it also possible to pass these values as POST instead of GET?

Thank you

You can set the URL a web experiment redirects to in a script via the defaults.finishpage propery. That URL can include query parameters, i.e. you'd do something like this:

<expt>
/ onexptend = [defaults.finishpage = text.redirect_to.item(1);]
...
</expt>

<text redirect_to>
/ items = ("http://example.com?subjectid=<%script.subjectid%>&dparam=<%expressions.d%>")
</text>


By francescodf - 12/20/2017

Dave - Wednesday, December 20, 2017
francescodf - Wednesday, December 20, 2017
Hi there,

Is it possible to pass a value of the script as an output parameter via url?

For example I would like to return a parameter d of the iat test at the end of the script http://example.com?dparam=XXXX

Is it also possible to pass these values as POST instead of GET?

Thank you

You can set the URL a web experiment redirects to in a script via the defaults.finishpage propery. That URL can include query parameters, i.e. you'd do something like this:

<expt>
/ onexptend = [defaults.finishpage = text.redirect_to.item(1);]
...
</expt>

<text redirect_to>
/ items = ("http://example.com?subjectid=<%script.subjectid%>&dparam=<%expressions.d%>")
</text>



Thanks Dave :)