SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    Old Fogey mancroft's Avatar
    Join Date
    Oct 2002
    Location
    lost
    Posts
    445
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Adjust size of window opened from form?

    The code below works nicely and opens the file (quizreply.php) that processes the email in a new window, just as intended.

    BUT is it possible to set the size and other characteristics of that window so it becomes just a pop-up?

    Thank you very much for you help.

    Code:
    <html>
    <head>
    <SCRIPT language=JavaScript type=text/javascript>
    <!--
    function checkform ( form )
    {
    // ** START **
    if (form.FIRSTNAME.value == "Name") {
    	alert( "Please enter your name." );
    	form.FIRSTNAME.focus();
    	return false ;
    }
     
    if (form.EMAILADDY.value == "Email address") {
    	alert( "Please enter your email address." );
    	form.EMAILADDY.focus();
    	return false ;
    }
     
    // require at least one radio button be selected
    var radioSelected = false;
    for (i = 0; i < form.style1.length; i++)
    {
    if (form.style1[i].checked)
    radioSelected = true;
    }
    if (!radioSelected)
    {
    alert("Please select one of the Q1 options.");
    return (false);
    }
    }
    //-->
    </SCRIPT>
    </head>
    <body>
    <FORM name=frmQuiz onsubmit="return checkform(this);" 
     action= "quizreply.php" target= "_blank" method=post>
     
    What color are leaves?<br>
     
    <input type="radio" value="green" name="style1">green<br>
    <input type="radio" value="blue" name="style1">blue<br>
    <input type="radio" value="red" name="style1">red<br>
     
     
    <INPUT class=input1 onfocus="value=' '" size=30 value=Name name=FIRSTNAME><br>
    <INPUT class=input1 onfocus="value=' '" size=30 value="Email address" name=EMAILADDY>
     
    <INPUT class=input3 type=submit value="Submit Comments" name=B1>
    </body>
    </html>
    :

    :

  2. #2
    SitePoint Wizard silver trophy
    Join Date
    May 2003
    Posts
    1,843
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ::: certified wild guess :::


Bookmarks

Posting Permissions

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