codetoad.com
  ASP Shopping CartForum & BBS
  - all for $20 from CodeToad Plus!
  
  Home || ASP | ASP.Net | C++/C# | DHTML | HTML | Java | Javascript | Perl | VB | XML || CodeToad Plus! || Forums || RAM 
Search Site:
Search Forums:
  onChange issue  deluxmilkman at 17:58 on Friday, October 26, 2007
 

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
[HTML]

<script language="JavaScript" type="text/JavaScript">
<!--
function pageCh(sectionURL) {

parent.section.location.href = sectionURL;
if(sectionURL == "/forum/section02.xml") {
parent.menu.location.href = "menu2.html";
}
}

//-->
</script>

[/HTML]

form in menu.html


[HTML]

<form>
<select onChange="pageCh(this.value)">
<option value="/forum/section01.xml" selected>1/option>
<option value="/forum/section02.xml">2</option>
</select>
</form>

[/HTML]




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 == "/forum/section01.xml") {
parent.menu.location.href = "menu.html";


}

//-->
</script>

[/HTML]

form in menu2.html

[HTML]

<form>
<select onChange="pageCh(this.value)">
<option value="/forum/section02.xml" selected>2</option>
<option value="/forum/section01.xml">1</option>
</select>
</form>

[/HTML]


thanks








CodeToad Experts

Can't find the answer?
Our Site experts are answering questions for free in the CodeToad forums
//








Recent Forum Threads
•  perl script help needed
•  onChange issue
•  perl remote execution
•  Chat application
•  How to send multiple perameters in SOAP request.
•  Java code for Insert picture on the table in spreadsheet
•  Re: Problem with concatenation
•  how to genrates the crystal report by sending a id at runtime
•  help me


Recent Articles
ASP GetTempName
Decode and Encode UTF-8
ASP GetFile
ASP FolderExists
ASP FileExists
ASP OpenTextFile
ASP FilesystemObject
ASP CreateFolder
ASP CreateTextFile
Javascript Get Selected Text


© Copyright codetoad.com 2001-2007