Back To Start Of Archive
Taken From The Forum: Archived Topics for the old Version 3.0 JavaScript Menu
Forum Topic: Click to view post
Last Updated: Wednesday July 18 2012 - 06:07:39
Menu conflict with hyperlink javascript:window.open ?
Poster: bbourj
Dated: Friday May 10 2002 - 10:49:46 BST
Hello,
I am in trouble with something which looks like a conflict between my basic javascript code and the menu code.
My page is pretty simple.
The HEAD section includes both menu script and my own function, named photoShow(page) :
<SCRIPT language=JavaScript src="menus/menuData.js" type=text/javascript></SCRIPT>
<SCRIPT language=JavaScript src="menus/menuEngine.js" type=text/javascript></SCRIPT>
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function photoShow(page) {
OpenWin = window.open(page, "photo", "width=300 height=100 left=0 top=0 toolbar=no,menubar=no,location=0,scrollbars=0,status=0,resizable=0");
}
// End -->
</SCRIPT>
This function is called in hyperlink :
<a href="javascript:photoShow('viewer.htm')";>Show</a>
The trouble is that the menu works fine, but seems to prevent my photoShow function to operate normaly. Indeed, when clicking the "Show" hyperlink, the child window opens, but I have two nasty effects in the parent window :
- The cursor gets to the "wait" style (meanwhile the window I open is an empty html page)
- The title turns back to the URL the page, instead of keeping set with the <title> tag value.
The child window behaves normally otherwise.
I checked any variable or function name collision without finding any
Is someone aware of that ?
Thanks