25 users online (2 members and 23 guests)  


  Results 1 to 2 of 2

Related

  1. windows 98 security    Forum: General Discussion
    Replies: 0
  2. run cgi script on Windows XP Pro    Forum: Javascript Forum
    Replies: 0
  3. Pop-up Windows    Forum: Javascript Forum
    Replies: 4
  4. sizeable pop up windows    Forum: HTML Forum
    Replies: 3
  1. #1
    nigellegg's Avatar
    New User

    Status
    Offline
    Join Date
    May 2001
    Location
    UK
    Posts
    1

    Post Pop up windows...

    We want to run a survey in a pop up window from a website. Can someone point me in the direction of information on how to do that? - ie, how to open the pop up window, we have the survey forms.
    thanks,
    NL

  2. #2
    QuietDean's Avatar
    Administrator

    Status
    Offline
    Join Date
    Oct 2000
    Location
    Bournemouth, UK
    Posts
    2,662

    Lightbulb

    Hiya Nige,

    How are you with Javascript? I have two examples to paste here, from a site I have been working on. They open small windows with forms inside. Is that what you after? Heres the examples...


    <script language="JavaScript">
    <!--
    function mail() {
    var win = window.open("", null, "height=250 width=300 resizable=yes");
    win.document.write("<body bgcolor=' #6666ff'><h1>Apply for Newsletter</h1><form action='mail.php' method='post'><input type='text' name='email'> Your email<br><input type='submit' value='Join mailing List'></form><form><input type='button' value='close' onClick='self.close()'></form></body>");
    }
    function mailcontact() {
    var win = window.open("", null, "height=400 width=300 resizable=yes");
    win.document.write("<body bgcolor=' #6666ff'><h1>Contact Sniper League</h1><form action='mail.php' method='post'><input type='text' name='name'> Your Name<br><input type='text' name='e_mail'> Your email<br>Your comments -<br><textarea cols='30' rows='10' name='message'></textarea><input type='submit' value='Send Email'></form><form><input type='button' value='close' onClick='self.close()'></form></body>");
    }

    //-->
    </script>

    The you call the functions through an onclick or whatever. Mine used javascript buttons.

    The things to watch - Everywhere you would have normally used " in the document write you have to replace with ' .Otherwise, just write your normal html form inside the section where I have mine. Watch out for carriage returns! they mean the end of the line, so javascript stops there.

    Hope that help, any questions, post 'em.

    ------------------
    QuietDean-



Tags for this Thread