deluxmilkman
Programmer
I have 2 html menu.html and menu2.html,
and would like to swich one another using "onChange" in each form.
function pageCh works first time, but it doesn't 2nd time.
alert("menu2") does not pop up either.
javascript in menu.html
form in menu.html
javascript in menu2.html
form in menu2.html
thanks
and would like to swich one another using "onChange" in each form.
function pageCh works first time, but it doesn't 2nd time.
alert("menu2") does not pop up either.
javascript in menu.html
HTML:
<script language="JavaScript" type="text/JavaScript">
<!--
function pageCh(sectionURL) {
parent.section.location.href = sectionURL;
if(sectionURL == "section02.xml") {
parent.menu.location.href = "menu2.html";
}
}
//-->
</script>
form in menu.html
HTML:
<form>
<select onChange="pageCh(this.value)">
<option value="section01.xml" selected>1/option>
<option value="section02.xml">2</option>
</select>
</form>
javascript in menu2.html
HTML:
<script language="JavaScript" type="text/JavaScript">
<!--
alert("menu2");
function pageCh(sectionURL) {
alert(sectionURL);
parent.section.location.href = sectionURL;
if(sectionURL == "section01.xml") {
parent.menu.location.href = "menu.html";
}
//-->
</script>
form in menu2.html
HTML:
<form>
<select onChange="pageCh(this.value)">
<option value="section02.xml" selected>2</option>
<option value="section01.xml">1</option>
</select>
</form>
thanks