1) Script Title: Glossy Accordion Menu.
2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...enu-glossy.htm.
3) Describe problem: Getting the onopenclose function to display the href contents to a named frame. Can this be done using the onopenclose function? If not, is there an alternate method?
I would like to use the onopenclose function to display the href contents in a named frame like the target="frameName" anchor tag attribute does.
I have a frameset that contains a frame named ideas_home into which I would like the href content to be displayed. I have tried various permutations to the location.replace statement in the onopenclose function but none perform as hoped. I don't have an external website where you can see this live but the following code snips and behavior descriptions should help.
Behavior Description: The following syntax causes the href contents to display in the frame that the menu is displayed in. The href being passed uses the target="ideas_home" attribute. This indicates that the function is working to display the href content - just not to the correct frame - seems to be ignoring the target= attribute of the href value.
Cheers.Code:<snip> onopenclose:function(header, index, state, isuseractivated){ //custom code to run whenever a header is opened or closed if (state=="block" && isuseractivated==true){ //if header is expanded and as the result of the user initiated action location.replace(header.getAttribute('href')) } } Behavior Description: The following syntax causes all the headers to display opened revealing all submenuheader items - I think the incorrect syntax is honking the script. When clicked, the menu items do create the href content in the correct frame but I don't think this is the onopenclose function working, I think it is the anchor tag attribute working. <snip> onopenclose:function(header, index, state, isuseractivated){ //custom code to run whenever a header is opened or closed if (state=="block" && isuseractivated==true){ //if header is expanded and as the result of the user initiated action window.frames.["ideas_home"].location.replace(header.getAttribute('href')) } }



Reply With Quote

Bookmarks