Magic Man
11-09-2003, 05:10 PM
I have a issue with a menu I am working on. It is in a frame set. I also have all of my js code in a .js file. This .js file is loaded on every page because it contains things for various needs.
What I need to do is allow links on the content page to activate a script to hi-lite the link on the menu. The script resides in the .js file so is present for all pages. The script on the menu page keeps a variable so that it knows when a link has been clicked, and when a new link is clicked, the old link is cleared and the new one hi-lited.
The problem is that I need to call the hi-lite function on the menu page. It will keep the proper variable for the hi-lited link as the function run from the content page has no variable set. I have tried several things with no luck. I know it is possible to do this but I am unsure what the syntax should be.
I have tried the following:
parent.frames[0].document.someFunction();
parent.menu.document.someFunction();
window.document.menu.document.someFunction();
None of these have worked. I can pass variables back and forth using these, but have not been able to call a function.
Any help with this problem would be appreciated!
What I need to do is allow links on the content page to activate a script to hi-lite the link on the menu. The script resides in the .js file so is present for all pages. The script on the menu page keeps a variable so that it knows when a link has been clicked, and when a new link is clicked, the old link is cleared and the new one hi-lited.
The problem is that I need to call the hi-lite function on the menu page. It will keep the proper variable for the hi-lited link as the function run from the content page has no variable set. I have tried several things with no luck. I know it is possible to do this but I am unsure what the syntax should be.
I have tried the following:
parent.frames[0].document.someFunction();
parent.menu.document.someFunction();
window.document.menu.document.someFunction();
None of these have worked. I can pass variables back and forth using these, but have not been able to call a function.
Any help with this problem would be appreciated!