Web Analytics Made Easy -
StatCounter Pick Date in form help - CodingForum


No announcement yet.

Pick Date in form help

  • Filter
  • Time
  • Show
Clear All
new posts

  • Pick Date in form help

    Can someone help me with this I dont understand javascript very well and this is baffling.
    I need to input a date string in my database from a page, I grabed this code from this site http://javascript.internet.com/forms...-selector.html
    its exactly what I want but I need a string of the date that I can use in my asp like condate = ddmmyyyy
    Hope you can help

  • #2
    By default, the option value property is the one sent to the server when the page is submitted. But if it is not specified, the selected option text property is the one submitted.

    So, you should specify the value attribute for the Month combobox

    <select name="FirstSelectMonth" onchange="ChangeOptionDays('FirstSelect')">

    Then in the server-side, concatenate the date values in the desired format:

    condate = Request.form("FirstSelectDay") & "/" & Request.Form("FirstSelectMonth") & "/" & Request.Form("FirstSelectYear")
    Last edited by glenngv; Feb 16, 2004, 03:36 AM.
    vBulletin Mods That Rock!


    • #3
      that did not work

      Sorry that did not work all I got as output was
      the //
      any suggestions??


      • #4
        I used the element names used in the original date selector script - FirstSelectDay, FirstSelectMonth and FirstSelectYear

        Of course you need to change them accordingly.
        vBulletin Mods That Rock!