SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Sep 2007
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Generating two different dates for a form.

    Hello all,
    I have a question that I'm trying to figure out.

    There is a form that I have been working on. The form needs to display information on it that, ideally, would be automatically generated.

    So, for example, I open this form today 9/6/2007 and I sent it out. The form result would show the current date with a time of 6:00am and then the previous day's date with a time of 6:00am.
    ----Form Data----------------------------------
    Data for: 9/5/2007 6:00am thru 9/6/2007 6:00am
    Name: Yourname
    Number: 123abc
    -----------------------------------------------
    So, again, I'm trying to write a script that will present current day and the previous day on the form and the results. I hope that I have been clear enough.
    If anyone has any suggestions I am certainly open to look at them. Thanks.

  2. #2
    CSS & JS/DOM Adept bronze trophy
    Join Date
    Mar 2005
    Location
    USA
    Posts
    5,482
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Welcome to SitePoint Forums, yannibmbr.

    It would be better to use a server-side language, e.g. PHP, to do this since not all people use browsers that have JavaScript supported enabled.
    We miss you, Dan Schulz.
    Learn CSS. | X/HTML Validator | CSS validator
    Dynamic Site Solutions
    Code for Firefox, Chrome, Safari, & Opera, then add fixes for IE, not vice versa.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •