center pop up

Discussion in 'Javascript' started by kevin, Jan 8, 2007.

  1. kevin

    kevin Guest

    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



    ----== Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet News==----
    http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
    ----= East and West-Coast Server Farms - Total Privacy via Encryption =----
     
    kevin, Jan 8, 2007
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    2
    Views:
    8,531
    Randy Webb
    Feb 4, 2006
  2. Bone Ur
    Replies:
    4
    Views:
    394
    Bone Ur
    Dec 19, 2007
  3. Chris Davoli

    Tool Tip pop up - pop up time is too short

    Chris Davoli, Feb 24, 2009, in forum: ASP .Net
    Replies:
    1
    Views:
    479
    Lee Atkinson
    Feb 24, 2009
  4. samppi
    Replies:
    27
    Views:
    493
    David A. Black
    Dec 5, 2007
  5. Ali Chambers

    Pop-up in window center

    Ali Chambers, Oct 6, 2004, in forum: Javascript
    Replies:
    2
    Views:
    80
    Ali Chambers
    Oct 7, 2004
Loading...

Share This Page