Is it possible within Axure to get the current page URL, including all its parameters, convert it to a string and assign that string to a variable?

Essentially what I’m trying to achieve is knowing whether the Highlight interactive elements variable is on/off and then redirect to a page determined by what it is set to. I know how to override it/set it through an Open Link function, but I want to know whether a user has turned it on/off.

If there is a way to do this aside from my initial question above then please let me know.

$_GET für Javascript [Javascript ist Toll!]

Provides 2 optional functions to get it via JavaScript. The function can be attached to the page head with JavaScript, using the JavaScript-widget-library or using axshare plugins. The request can be done in the open page in current window action. Setting a variable value is setVariableValue(‘variable’,value) or setGlobalVariableValue? I m not sure. - writing on a tablet without a chance to test it. Setting a rects value to the result should be something like:

1 Like

I have been trying for ages to get the current URL and posts like this helped but I could not find a post that showed me exactly how to do it. So figured I would respond in case anyone else searching for it.

Open Link to external URL and past the following code
var prefix = window.location.href;
$axure.setGlobalVariable(‘OnLoadVariable’, prefix);

The Variable OnLoadVariable will have the full path name and parameters. You can then use string functions .indexOf and .substr to extract what you need.


1 Like

I’ve been successfully using your script for about 6 months and it suddenly stopped working today. Any thoughts?

I set up our prototype so that dynamic panels change to reflect different branding combinations.

Our production system links to it but we wanted to be able to show different branding based on the URL coming in. The Production system is able to quickly configure the white label and we wanted the Axure prototype to do the same based on the URL coming in.

To do this, I created a lightweight landing page for each brand with an OnPageLoad script that set the variables needed to show the correct logos and color schemes, then quickly redirected to the next pages.

The production system then just linked to the correct Axure set up page that sets all the variables in the dynamic panels.

Not sure if thats what you are looking for or not

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.