i have a simple little form
<form id="loginform"> <input id="myinput" type="text" /> <input name="submit" value="go" type="submit" /></form>
in a very not secure way i want it to go to different urls depending on the input value.
here is my simple little jquery script that i am sure could be written more succinctly. (feel free to help)
$(document).ready(function() {
jQuery.noConflict();
var apple = 'http://www.apple.com';
var microsoft = 'http://www.microsoft.com';
jQuery('#loginform').submit(function() {
var pass = jQuery('#myinput').val();
if (pass=='apple') {
var currentloc=apple;
} else if (pass=='microsoft') {
var currentloc=microsoft;
}
else {
var currentloc ='http://www.mysite.com/sorry';
}
window.open(currentloc, 'formpopup', 'width=800,height=600,resizeable=1,scrollbars=1');
});
});
this works when i run it on ffcurrent macintosh, but not when i run it in ie7. then the popup window is the same as the window we are coming from.