Rank: Advanced Member Groups: Member
Joined: 9/4/2007 Posts: 114
|
We have a Menu with NavigateUrl properites loaded from a DataSet. We now want to call "some" items using JavaScript utilizing the OnClickScript function. Since all items come from sql tables, can the NavigateUrl and OnClientScript properties be loaded for all menu options without interferring or causing errors if one or the other is not populated?
I see the OnClickScript event is higher in the Event sequence, so, presumably it will be handled before the NavigateUrl. Is this correct?
If using the OnClickScript is loaded and the NavigateUrl is not set, will it simply call the script specified and not fail on the NavigateUrl?
If the OnClickScript is NOT loaded, the item has a NavigateUrl specifed, will the OnClickScript bypass [gracefully] and handle the NavigateUrl?
Do you have any samples using this model?
Thanks.
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,218
|
Hi, The page that you were looking at should already have all the details and samples: http://www.essentialobjects.com/ViewDoc.aspx?t=MenuCommon%2fHandlingEvent%2fclient_event.htmlIt has nothing to do with whether OnClickScript is loaded or not, but has not do with what you do inside OnClickScript. If you do not wish it to continue to go down to NavigateUrl, you cancel the event by calling eo_CancelEvent inside OnClickScript. Otherwise it will keep going down the pipe. Thanks
|
Rank: Advanced Member Groups: Member
Joined: 9/4/2007 Posts: 114
|
Ok, it's all good and working now.
Thanks.
|