AnyLink works fine in pages, but not when those pages are in frames
1) Script Title: AnyLink JS Drop Down Menu v2.2
2) Script URL (on DD):
3) Describe problem:
I am a total novice at java (I don't know it at all, but I am able to copy and
edit the provided code).
I am using the "AnyLink JS Drop Down Menu" script, and it is working perfectly for me when I view my pages in their own windows. However, when I create a frameset page with frames containing pages that have the anylinkmenu's in them, the menus no longer work. I don't get any "error on page" messages--there are just no menus at all.
I include all the provided code in the HEAD section (directly below the <head> line) of both my frameset page and my individual frame pages. I've also tried just including the code in the individual frame pages and just including the code in the frameset page. All files are within my same website within the same directory.
Can anyone advise me on what might be the problem? I think it should be an easy fix.
P.S. in the menucontents.js file, I set the linktarget value to the name of the target frame in my frameset page. That's all I need to do, right?
(e.g. linktarget:'MAIN' says the target of links in the menu is the MAIN frame).
Thank you for that reference, but I think my situation is different and simpler.
I have a frameset page with frames called TOP and BOTTOM.
In the TOP frame, I have a page with an Anylink menu, whose linktarget is set to BOTTOM. I just want to update the BOTTOM frame when I click on a menu item in the TOP frame.
The example you linked me to involved someone who wanted the Anylink menus in the top frame to protrude into the bottom frame. I don't need to do anything complicated like that. I just want my links to work
I am wrong in my assumption that the LINKTARGET parameter of the menu definition is meant to be the target frame?
I think my problem is something related to having the pages (either the frameset or the frame page) include the javacript. I don't know if that makes sense.
I'm the person whom you described 'someone involved'.
I don't know whether the 'linktarget' works as 'target' in the ordinary frameset script or not.
But your problem seems like as DD Admin discribed " Frames are basically treated as two separate windows inside the browser. " I encountered the same problem as you have encountered that when the menus are located in both frames it even doesn't show up.
I think you have to do as the senior coder suggested you for getting your solution. ... Thanks.
If there's enough room in the top frame for showing the subitems of the anylink menu (in the top frame!), then you don't need the technique explained in my post above. In that case, just put the files provided by DD in the head of the top frame. In your frameset, you should have name="secwin" for the bottom frame. All the lines that have linktarget:'secwin' in menucontents.js will now appear in the bottom frame.
This does it for non-IE. But in IE, it won't work! That's a problem related to the menu itself. You should contact ddadmin about it.
I found the 'linktarget' works for frame name. I put the target frame name into the value of the 'linktarget'. It works. You can view it at http:www.kissesnhugs.com. If you click the links in the submenus then the link pages shall be appeared in the targeted frame: i.e., center frame in the site in this case.
By the way, do you happen to know which eCommerce software / Shopping cart software is reliable and well ?
Last edited by naremkim; 03-10-2010 at 12:31 PM.
Am I out of luck if use IE
Thank you for the information. I am using IE, and so will everyone else who views my site. Am I out of luck, or is there a solution that will make this work on IE?
The name 'secwin' isn't a special keyword, right? If the name of my frame is 'BOTTOM', I should set the linktarget value in the menu definition to BOTTOM, right?
Naremkin, it works for you because you apply the technique that I explained here. Jddela's case is different, because he/she uses a static frameset, with no need of having the subitems on top of the frame. IE has a problem there.
jddela, here's something that works always / everywhere. Quite different from what you're doing right now.
Thanks a lot both of you.
And extra special thanks to molendijk.