Welcome Guest Search | Active Topics | Sign In | Register

Select MenuItem on page load - javascript Options
Mark
Posted: Wednesday, April 29, 2009 7:25:10 AM
Rank: Newbie
Groups: Member

Joined: 3/10/2009
Posts: 8
I am using the Menu control (RedTab 2 design) and I need to select the appropriate menu tab on page load after postback or redirect. The "SaveStateCrossPages" and "StateCookieName" methods don't appear to do anything. If I set "SaveStateCrossPages" to true shouldn't I see a value going across in the querystring? Anyway I wrote code to set a cookie myself and I have that working fine but I can't figure out how to select the appropriate tab on page load using that cookie value. Or explain to me what I may be doing wrong with SaveStateCrossPages.

Please help
Mark
eo_support
Posted: Wednesday, April 29, 2009 12:41:09 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi,

You would call this method to select a menu item:

http://doc.essentialobjects.com/library/1/jsdoc.public.navigationitem.setselected.aspx

In order to call this function, you will need to get a menu item object first. There are various ways to get a menu item objects. For example, you can do:

Code: JavaScript
eo_GetObject("Menu1").getTopGroup().getItemByIndex(0);


To get the first top level item. You can get detailed information about our client side API here:

http://doc.essentialobjects.com/library/1/clientapi_howto.aspx

SaveStateCrossPages works with NavigateUrl only. It does not work post back or server side redirect. So that maybe the reason why it is not working for you.

Thanks!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.