1. No Profile Picture
    Devshed Newbie (0 - 499 posts)
    All right here's my plan. I am creating a form and i want it so that when someone pushes the submit button it does its thing and then loads a new page. I have a feeling this is done with the onSubmit command. but i am an amateur at javascript and require help. Thank you all!

    Justin Steinfadt - aka Lt.Cmd.Data
  2. #2
  3. No Profile Picture
    Devshed Newbie (0 - 499 posts)
    <SCRIPT language='javascript'>

    function validate (frm) {
    // form validation code goes here
    // for example:
    var retval = 1;
    if (frm.City.value != "Venice") {
    alert ("Wrong");
    retval = 0;
    // And so on.
    return retval;

    onSubmit="return validate(this);"

    <P>In what city is the Grand Canal located?"</P>
    <INPUT type=text name="City">
    <INPUT type=submit value="Enter">

Similar Threads

  1. Evoke Shell Command in Perl
    By yannn in forum Perl Programming
    Replies: 0
    Last Post: February 16th, 2004, 02:14 PM
  2. command line doesn't work
    By jyu1 in forum MySQL Help
    Replies: 1
    Last Post: October 8th, 2003, 09:55 AM
  3. My PostData command doesn't work
    By Curtis in forum Beginner Programming
    Replies: 3
    Last Post: August 12th, 2003, 01:28 PM
  4. Replies: 0
    Last Post: December 17th, 2000, 10:45 AM
  5. the Mail command doesn't work
    By dave1904 in forum PHP Development
    Replies: 2
    Last Post: April 7th, 2000, 11:01 AM

IMN logo majestic logo threadwatch logo seochat tools logo