center pop up

K

kevin

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 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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,818
Messages
2,569,727
Members
45,675
Latest member
benn

Latest Threads

Top