Forum Moderators: open
index.php contains
<?php include ("codeh/jumpmenuhelp.php"); ?> in the head section,
<?php include ("header.php"); ?> in the body section
jumpmenuhelp.php contains:
<script type="text/javascript">
<!--
function MM_jumpMenu(targ,selObj,restore){ //v3.0
eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
if (restore) selObj.selectedIndex=0;
}
//-->
</script>
for my whole site I bring in the top menu/main navigation to each page by using
<?php include ("header.php"); ?>
header.php contains:
<form name="form" id="form">
Show me how to
<select name="jumpMenu" id="jumpMenu" onchange="MM_jumpMenu('parent',this,0)">
<option value="http://www.example.com/Help/calendar.php">Post in the Calendar</option>
<option value="http://www.example.com/Help/forum.php">Post on the Forum</option>
</select>
</form>
Both calendar.php and forum.php contain:
<?php include("../codeh/jumpmenuhelp.php"); ?> in the head section
<?php include("../menu.php") ?>
I think that's all the relevant code!
So from the index page I can jump to either of my help pages using the jumpmenu, which sets its self to the first option again ie 'post in the calendar' on each page load. From the calendar page I can jump to the forum page fine, but from the forum page it ceases to work.
It all seems very simple and I'm very confused. I need to add a few more help pages but I'm not sure what I've done wrong so far?
Any advice would be great, I don't know much about javascript or php but I'm picking it up slowly. I've just started to use the php include function to try and make my site more easily editable and better organised as it grows.
Thanks,
Mr Cat
[edited by: Mr_Cat at 1:41 pm (utc) on Nov. 28, 2008]