seguinc
03-07-2007, 03:50 PM
1) Script Title: HVMenu
2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex1/hvmenu/index.htm
3) Describe problem:
Here is the web site I have created: www.fireworksbyseguin.com
The website uses frames, 3 in fact: one for navigation, one for content, and one for general links. My problem occurs after I have clicked any part of the navigation bar once. It works fine the first time through, however, I cannot see the sub-menus afterward.
I have seen posts regarding this before, where a line of code is added to the body of each page to be loaded into the content frame.
<html>
<head>your header html</head>
<body onload="javascript:{if(parent.frames[0]&&parent.frames['MyFrameOne'].Go)parent.frames['MyFrameOne'].Go()}">
your html
</body>
</html>
(Where MyFrameOne is the name of the navigation frame.)
This worked right until I ran into a resolution problem, where my menu appeared somewhere else on the line I wanted to use. I've followed the advice of one post where I can use the built in function that use DIV tags.
originally from - HVmenu config.htm (Explanation of exmplmenu_var.js file):
TargetLoc
Text string- Enables relative positioning of the menu.
1- In the HTML-file where the menu shows you need a named div:
<div id='MenuPos' style='position:relative'></div>
2- Set TargetLoc to 'MenuPos'
3 - Set MenuCentered to 'left', MenuVerticalCentered to 'top' and StartTop and StartLeft to 0
4 - StartTop, StartLeft and the Menu center variables can still be used to get an offset from the <div>.
Remarks: the different ways browsers interpret the pageX and pageY offset makes this feature difficult. I got the best results by putting the div inside a table, give the div the same dimensions as the first level menu, put an transparent image inside the div with again the same dimensions as the first level menu
<table>
<tr><td>
<div id='MenuPos' style='position:relative; width:102; height:102;'><img src='transparent.gif' width='102' height='102'></div>
</td></tr>
</table>
Here is my frame where I use this function:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Eng Title & Nav Frame</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#000000">
<noscript>
Your browser does not support script
</noscript>
<div align="left">
<table width="968" border="0" cellspacing="0" cellpadding="0">
<!--DWLayoutTable-->
<tr>
<td width="216" rowspan="3" valign="top"><p align="center"><a href="English/english.htm" target="Main Display"><img src="images_root/fbslogo8.png" width="215" height="195" border="0" align="top"></a><font color="#3366CC">
Click logo for Home Page</font></p></td>
<td width="752" height="21" align="center" valign="top"> <h1><font color="#3366CC" face="Verdana, Arial, Helvetica, sans-serif">
<script type='text/javascript' src='daystoCanDay.js'></script>
</font></h1></td>
</tr>
<tr>
<td height="152"> </td>
</tr>
<tr>
<td height="41" valign="top"><div id='MenuPos' style='position:relative'>
<script type='text/javascript' src='FBSmenu_var.js'></script>
<script type='text/javascript' src='menu_com.js'></script>
<script type='text/javascript'>
//HV Menu- by Ger Versluis (http://www.burmees.nl/)
//Submitted to Dynamic Drive (http://www.dynamicdrive.com)
//Visit http://www.dynamicdrive.com for this script and more
function Go(){return}
</script>
</div></td>
</tr>
</table>
</div>
</body>
</html>
I have tried with and without the transparent JPG suggested in posts and in the original file which explains how things work. The result is the same. I have seen some people chastized in different forums for posting the same sort of question, however, have not seen this exact post yet. I want to bring it up here before going to see the author.
Please help if you can.
Thanks.
2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex1/hvmenu/index.htm
3) Describe problem:
Here is the web site I have created: www.fireworksbyseguin.com
The website uses frames, 3 in fact: one for navigation, one for content, and one for general links. My problem occurs after I have clicked any part of the navigation bar once. It works fine the first time through, however, I cannot see the sub-menus afterward.
I have seen posts regarding this before, where a line of code is added to the body of each page to be loaded into the content frame.
<html>
<head>your header html</head>
<body onload="javascript:{if(parent.frames[0]&&parent.frames['MyFrameOne'].Go)parent.frames['MyFrameOne'].Go()}">
your html
</body>
</html>
(Where MyFrameOne is the name of the navigation frame.)
This worked right until I ran into a resolution problem, where my menu appeared somewhere else on the line I wanted to use. I've followed the advice of one post where I can use the built in function that use DIV tags.
originally from - HVmenu config.htm (Explanation of exmplmenu_var.js file):
TargetLoc
Text string- Enables relative positioning of the menu.
1- In the HTML-file where the menu shows you need a named div:
<div id='MenuPos' style='position:relative'></div>
2- Set TargetLoc to 'MenuPos'
3 - Set MenuCentered to 'left', MenuVerticalCentered to 'top' and StartTop and StartLeft to 0
4 - StartTop, StartLeft and the Menu center variables can still be used to get an offset from the <div>.
Remarks: the different ways browsers interpret the pageX and pageY offset makes this feature difficult. I got the best results by putting the div inside a table, give the div the same dimensions as the first level menu, put an transparent image inside the div with again the same dimensions as the first level menu
<table>
<tr><td>
<div id='MenuPos' style='position:relative; width:102; height:102;'><img src='transparent.gif' width='102' height='102'></div>
</td></tr>
</table>
Here is my frame where I use this function:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Eng Title & Nav Frame</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#000000">
<noscript>
Your browser does not support script
</noscript>
<div align="left">
<table width="968" border="0" cellspacing="0" cellpadding="0">
<!--DWLayoutTable-->
<tr>
<td width="216" rowspan="3" valign="top"><p align="center"><a href="English/english.htm" target="Main Display"><img src="images_root/fbslogo8.png" width="215" height="195" border="0" align="top"></a><font color="#3366CC">
Click logo for Home Page</font></p></td>
<td width="752" height="21" align="center" valign="top"> <h1><font color="#3366CC" face="Verdana, Arial, Helvetica, sans-serif">
<script type='text/javascript' src='daystoCanDay.js'></script>
</font></h1></td>
</tr>
<tr>
<td height="152"> </td>
</tr>
<tr>
<td height="41" valign="top"><div id='MenuPos' style='position:relative'>
<script type='text/javascript' src='FBSmenu_var.js'></script>
<script type='text/javascript' src='menu_com.js'></script>
<script type='text/javascript'>
//HV Menu- by Ger Versluis (http://www.burmees.nl/)
//Submitted to Dynamic Drive (http://www.dynamicdrive.com)
//Visit http://www.dynamicdrive.com for this script and more
function Go(){return}
</script>
</div></td>
</tr>
</table>
</div>
</body>
</html>
I have tried with and without the transparent JPG suggested in posts and in the original file which explains how things work. The result is the same. I have seen some people chastized in different forums for posting the same sort of question, however, have not seen this exact post yet. I want to bring it up here before going to see the author.
Please help if you can.
Thanks.