• Nike free run 2 pink
  • Nike free 5.0 kids
  • Oakley sunglasses discount
  • CodeAve.com CodeAve.com - JavaScript - Forms
    ASP
    JavaScript
    ·Document Info
    ·Forms
    ·Images
    ·Miscellaneous
    ·Navigation
    ·Script Writers
    ·Contents
    ·What's New?
    CSS
    HTML
    Maps
    Links
    Mail List
    Search
    Sitemap


     

  • Retro 3 jordans
  • Jordan 13 retro
  • Nike free 5.0

  • Future Date Validation
  • Air jordan 11 low
  • New Balance 996
  • Ray ban vintage sunglasses
  • There are many uses for date forms on the web. Rather than having improper input reach your application itís best to stop improper input from leaving the client wherever possible. The following form will allow input for month and year. If the request is a future date a simple tautology will display a dialog box requesting that the user place a different request.
    View the Output
    Text View
    Print View
    Mail this Link
    Download the Code

    <html>
    <title>CodeAve.com(Future Date Validation)</title>
    <body bgcolor="#FFFFFF">
    <center>
    <script Language="JavaScript">
    <!--
    // Function to validate the dropdown form input
    function dropdown_validator()
    {
    // Variables for the current date, year and month
    var right_now=new Date();
    var the_year=right_now.getYear();
    var the_month=right_now.getMonth();

    // Check for input in both the month and year fields
    if (dropdown_form.u_month.value == "" || dropdown_form.u_year.value == "")
    {
    alert("Please select a month and year");
    return false;
    }

    // Check to see if the request is within the current year and month
    if (dropdown_form.u_year.value == the_year && dropdown_form.u_month.value > the_month)
    {
    alert("Please check the month of your request.");
    return (false);
    }


    // Check to see if the year request is calid
    if (dropdown_form.u_year.value > the_year)
    {
    alert("Please check the year of your request.");
    return (false);
    }

    // Comment out the alert below and change the location to your destination
    alert("The request is valid\nMonth = "+ dropdown_form.u_month.value +"\nYear = "+ dropdown_form.u_year.value);
    // window.location.replace= dropdown_form.u_month.value + dropdown_form.u_year.value

    }
    -->
    </script>
    <form method="get" action="#"
    onsubmit="return dropdown_validator()" name="dropdown_form">
    Select a month and year<br>
    All requests with future dates will be denied<br>
    <select size="1" name="u_month">
    <option value="">Month</option>
    <option value="1">Jan</option>
    <option value="2">Feb</option>
    <option value="3">Mar</option>
    <option value="4">Apr</option>
    <option value="5">May</option>
    <option value="6">Jun</option>
    <option value="7">Jul</option>
    <option value="8">Aug</option>
    <option value="9">Sep</option>
    <option value="10">Oct</option>
    <option value="11">Nov</option>
    <option value="12">Dec</option>
    </select>

    <select size="1" name="u_year">
    <option value="">Year</option>
    <option value=2002>2002</option>
    <option value="2001">2001</option>
    <option value="2000">2000</option>
    <option value="1999">1999</option>
    <option value="1998">1998</option>
    </select>
    <input type="submit" value="Submit">
    </form>
    </center>
    </body>
    </html>

     

     

     



    ASP: What's New? | Articles | Script Writers | Database Display | Read/Write
    Server Variables | Response Objects | Random Events | Miscellaneous
    HTML: Forms | Hyperlinks | Headers | Tables | Hyperlinks | Headers | Text Display
    JavaScript: Document Info | Forms | Images | Navigation | Script Writers
    CSS: Basics | Page Display | Text Display | Script Writers | Miscellaneous
  • 2014 michael kors
  • air max women 2013
  • 2014 michael kors
  • air max 2014
  • oakley glasses
  • oakley glasses

  • Maps: Map Script Writers | Bing Maps | Google Maps
  • bottes fr
  • ugg boot
  • Privacy Statement

    CodeAve.com is hosted by MyHosting.com
    Donate Food Online with a Mouse Click at TheHungerSite.com
    Donate Land Online with a Mouse Click at TheRainForestSite.com
    © 1999 - 2017 CodeAve.com
    All Rights Reserved

    jordan 11 gamma Nike KD VI lebron 11 low