Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Aug 2002
    Location
    United Kingdom
    Posts
    37
    Thanks
    0
    Thanked 0 Times in 0 Posts

    form tag in new window usin JS ?

    Firstly the code

    ------------------------------------------------------------------------------------

    <form method="post" action="http://members.notifylist.com/edit/joinlist"><input type="hidden" name="list_name" value="thewizsite-thewizsite"><input type="text" name="email" value="Mailing list" id="join_textarea" size="15"> <input type="submit" value="Go" id="join_button"></form>

    ------------------------------------------------------------------------------------

    How can I open the page in a new window when the user clicks go, using javascript. So if I wanted to open it in a 500x500 window, from where would i activate the JS function ?

    Thanks ...

  • #2
    Senior Coder Nightfire's Avatar
    Join Date
    Jun 2002
    Posts
    4,265
    Thanks
    6
    Thanked 48 Times in 48 Posts
    <script type="text/javascript" language="javascript">
    <!--
    function openPopup(){
    window.open("","_popup","toolbars=0,location=0,width=500,height=500");
    return true;
    }
    //-->
    </script>

    <form method="post" action="http://members.notifylist.com/edit/joinlist" target="_popup" onsubmit="return openPopup()">

  • #3
    New Coder
    Join Date
    Aug 2002
    Location
    United Kingdom
    Posts
    37
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Wow ...

    Thanks Nightfire !
    That worked perfectly. Good stuff, good stuff ...


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •