Hi everybody,
Im trying to use that piece of javascripts for 2 combo box in my web site but its nt working on Firefox but it works well in IE 6.0 :S
Can someone please help me in solving this problem.
I included the js functions.
The first ComboBox is when the user select an option the URL must may be a pop up and the second ComboBox needs to open the URL within the page itself.
Both are using the onChange() function.
Thanks for a quick reply or solutions ;)
The codes are as follows:
=> included in the <head>
Im trying to use that piece of javascripts for 2 combo box in my web site but its nt working on Firefox but it works well in IE 6.0 :S
Can someone please help me in solving this problem.
I included the js functions.
The first ComboBox is when the user select an option the URL must may be a pop up and the second ComboBox needs to open the URL within the page itself.
Both are using the onChange() function.
Thanks for a quick reply or solutions ;)
The codes are as follows:
=> included in the <head>
Code:
<script type="text/javascript">
function MM_goToURL() { //v3.0
var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}
function MM_openBrWindow(theURL,winName,features) { //v2.0
if (theURL != "") {
window.open(theURL,winName,features);
}
}
function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
</script>
------------------
<body>....
<select name="select" class="booking" onChange="MM_openBrWindow(this.options(this.selectedIndex).value,'bookwindow','')">
<option selected="selected">--------</option>
<option value="http://www.google.com">1</option>
<option value="http://www.google.com">2</option>
<option value="http://www.google.com">3</option>
<option value="http://www.google.com">4</option>
<option value="http://www.google.com">5</option>
</select>
-------------
<select name="select2" class="booking" onChange="MM_goToURL('parent',this.options(this.selectedIndex).value);return document.MM_returnValue">
<option selected="selected" value="#">--------</option>
<option value="http://www.google.com">1</option>
<option value="http://www.google.com">2</option>
<option value="http://www.google.com">3</option>
<option value="http://www.google.com">4</option>
<option value="http://www.google.com">5</option>
</select>
Comment