I am struggling with this what i want to do is submit the form in a center pop up window. The submit button is a hyperlink not a submit button.
here is my code below thanks
<script type=text/javascript>
<!–
var win= null;
function NewWindow(myform,mypage,myname,w,h,scroll){
var winl = (screen.width-w)/2;
var wint = (screen.height-h)/2;
var settings =’height=’+h+’,’;
settings +=’width=’+w+’,’;
settings +=’top=’+wint+’,’;
settings +=’left=’+winl+’,’;
settings +=’scrollbars=’+scroll+’,’;
settings +=’resizable=yes’;
win=window.open(”,myname,settings);
myform.target=myname;
if(parseInt(navigator.appVersion) >= 4){win.window.focus();}
}
function MM_openBrWindow(theURL,winName,features) {
window.open(”,winName,features);
}
//–>
</script>
<form name=”myform” action=”submit-form.php” onSubmit=”return NewWindow(myform,”,’EmailInfo’,’700′,’500′,scroll)”>
Search: <input type=’text’ name=’query’>
<A href=”javascript:document.myform.submit()” >Submit</A>
</form>