maltrecho
02-19-2003, 10:08 PM
I've got a problem with the code I'm using and I hope any of you can help me.
I've got a form with some check-boxes and a submit button. Depending on the box that is checked, the user should be leaded to a new browser window or to an url in the same window.
The javascript is in a *.js file, and the code is like this:
------------------------------------------------------------------------------------
function Select(){
if(document.form.CHECKBOX1.checked==true)window.open('http://THEURL1/'+document.form.text.value);
if(document.form.CHECKBOX2.checked==true)window.open('http://THEURL1/'+document.form.text.value);
}
------------------------------------------------------------------------------------
So, this way if both check-boxex are checked, the active window will go to an url, and a new window will lead to the second url.
I don't know if the problem is with the window.open (I thought it should be self.open). And I also tried to add a '_top' or '_same' after the +document.form.text.value. I can't make it work. Any suggestion?. Thanks in advance.
I've got a form with some check-boxes and a submit button. Depending on the box that is checked, the user should be leaded to a new browser window or to an url in the same window.
The javascript is in a *.js file, and the code is like this:
------------------------------------------------------------------------------------
function Select(){
if(document.form.CHECKBOX1.checked==true)window.open('http://THEURL1/'+document.form.text.value);
if(document.form.CHECKBOX2.checked==true)window.open('http://THEURL1/'+document.form.text.value);
}
------------------------------------------------------------------------------------
So, this way if both check-boxex are checked, the active window will go to an url, and a new window will lead to the second url.
I don't know if the problem is with the window.open (I thought it should be self.open). And I also tried to add a '_top' or '_same' after the +document.form.text.value. I can't make it work. Any suggestion?. Thanks in advance.