Page 1 of 1

How do I activate more than one state in advanced html

Posted: Fri Nov 10, 2017 10:59 pm
by artonic
I have this code to use in an Advanced HTML Component to link to a State:
<a href="" onclick="window.parent.site9.PageStateMgr.getState('500').setValue('1');">

My question is, how do I make that link work for multiple states at once?

Re: How do I activate more than one state in advanced html

Posted: Tue Nov 14, 2017 1:02 pm
by Jamie Ramani
To carry on using the same format, you could add a second state and value using something like this:

<a href="" onclick="window.parent.site9.PageStateMgr.getState('500').setValue('1');window.parent.site9.PageStateMgr.getState('501').setValue('1');">

However, your best bet may be to use a different technique if you plan on adding multiple states to your on click action. Here's a blog post that has a good example of how you might to do so: http://community.protoshare.com/2013/07/advanced-html-components-pages-states/