Help with JavaScript

Discussion in 'Software' started by F18delta, Jul 19, 2004.

  1. F18delta

    F18delta Private E-2

    I am coding a web site for class that requires me to validate two fields in a form against the current date: the credit card expiration month and year. I have them both listed as drop downs with the months listed as 3 letter abbreviations and years ranging from 2004 to 2009. As I have written approximately ZERO JavaScripts before in my life, I would appreciate any and all help. The URL to the site is here for those interested.

    I have coded :

    <script language="JavaScript1.1" src="CreditChecker.js"></script>

    function validateCredit(form)
    {
    return (
    checkString (form.elements["CCMonth"]) &&
    checkString (form.elements["CCYear"])
    )

    }

    </script>

    thusfar and need to figure out how exactly I am supposed to get this to be checked once the user hits the submit button (which is also inoperable at the moment, but I think that the two will rely on each other in the end).

    I made the initial form in FrontPage after having my butt handed to me on a plate when trying to work with DreamWeaver . I'd assume that DW is much easier once you have at least played with it for more than an hour or so. Plus I am not willing to bring my copy of DW to work so that I can hand over the license to my boss, so I talked him into letting me install FP.
     

MajorGeeks.Com Menu

Downloads All In One Tweaks \ Android \ Anti-Malware \ Anti-Virus \ Appearance \ Backup \ Browsers \ CD\DVD\Blu-Ray \ Covert Ops \ Drive Utilities \ Drivers \ Graphics \ Internet Tools \ Multimedia \ Networking \ Office Tools \ PC Games \ System Tools \ Mac/Apple/Ipad Downloads

Other News: Top Downloads \ News (Tech) \ Off Base (Other Websites News) \ Way Off Base (Offbeat Stories and Pics)

Social: Facebook \ YouTube \ Twitter \ Tumblr \ Pintrest \ RSS Feeds