If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 2 of 2
  1. #1
    Junior Member
    Join Date
    Dec 2010
    Member #

    I am trying this code to work but it does not, when nothing is entered into the username field the message does not pop up.
    please correct the code for me if possible.

    <script type="text/javascript">
    function validate()
    alert("Error detected")
    return false

    alert("form submitted")
    return true

    <form name="Si" >
    Enter username:<input type="text" name="username">
    <input type="submit" value="submit" onsubmit="return validate()">
    <input type="reset" value="reset">

    Clement Osei.


  3. #2
    Unpaid WDF Intern TheGAME1264's Avatar
    Join Date
    Dec 2002
    Not from USA
    Member #
    2784 times
    First off, you're not even gathering the input for the username field.

    Second, you've misspelled "Datails" (that should say "Details"...this is case sensitive).

    Third, you should put a semi-colon at the end of each line so that it's obvious where the line of code is supposed to stop.

    This should get you started.
    If I've helped you out in any way, please pay it forward. My wife and I are walking for Autism Speaks. Please donate, and thanks.

    If someone helped you out, be sure to "Like" their post and/or help them in kind. The "Like" link is on the bottom right of each post, beside the "Share" link.

    My stuff (well, some of it): My bowling alley site | Canadian Postal Code Info (beta)

Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
All times are GMT -6. The time now is 10:22 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: