46 users online (1 members and 45 guests)  

Thread: Date Validation


  Results 1 to 8 of 8

Related

  1. ajax validation    Forum: PHP Forum
    Replies: 2
  2. Replies: 4
  3. Replies: 4
  4. Form validation - please help!    Forum: Javascript Forum
    Replies: 3
  1. #1
    taywm's Avatar
    New User

    Status
    Offline
    Join Date
    Apr 2002
    Posts
    3

    Question Date Validation

    Hi

    I am looking for either Java or HTML coding to date stamp an order form. I need for the today’s date to come from my server to insure that the correct date is being used. In need to fill <INPUT type=“hidden” name=”startdate” value=”YYYYMMDD”> were the value= today’s date.. Avery time this order form is submitted the date has to be submitted as well.

    You would think that the payment gateway would keep track of the date?

    Thank you

  2. #2
    Derek's Avatar
    Be Yourself

    Status
    Offline
    Join Date
    Aug 2001
    Location
    St. George, Utah, USA
    Posts
    466
    I don't get what ur saying. So do you already submitting something else besides the date with the submition? then the date should send...

    <form method=GET action="whatever">
    Q1 <input type="text" name="Q1"><br>
    Q2 <input type="text" name="Q2"><br>
    <input type=“hidden” name=”startdate” value=”YYYYMMDD”>
    <input type="submit" name="submit" value="Submit">
    </form>

    does your form look something like this? Why don't you post your whole code, cause I don't really get what ur asking in full. Have you already submitted the date but don't know what to do with it, or is it just submitting the date, or what.

  3. #3
    taywm's Avatar
    New User

    Status
    Offline
    Join Date
    Apr 2002
    Posts
    3

    Data Validation form Code

    Derek
    Thank You for your reply

    <form method="POST" action="whatever"
    <input type="hidden" name="referurl" value="http://www.rccc.biz/orderform.html">
    <input type="hidden" name="storename" value="xxxxx">
    <input type="hidden" name="mode" value="payplus">
    <input type="hidden" name="installments" value="12">
    <input type="hidden" name="periodicity" value="m1">
    <input type="hidden" name="submode" value="periodic">
    <input type="hidden" name="threshold" value="2">
    <input type="hidden" name="startdate" value="YYYYMMDD">
    <input type="submit" value="Submit" name="B1"><input type="reset" value="Reset" name="B2">

    What I am looking to do is to post a valid date hidden in the form to the gateway server to Validate the customer start date?
    <input type="hidden" name="startdate" value="YYYYMMDD">
    Right now I have it set up were I change the date at 12pm.
    Thank you
    Last edited by taywm; 04-06-2002 at 06:05 PM.

  4. #4
    Derek's Avatar
    Be Yourself

    Status
    Offline
    Join Date
    Aug 2001
    Location
    St. George, Utah, USA
    Posts
    466
    sorry if it's dumb on my part but I never use hidden form variables so... whats wrong with the code you have? It looks likes it's submitting the date along with all the other information.

  5. #5
    taywm's Avatar
    New User

    Status
    Offline
    Join Date
    Apr 2002
    Posts
    3
    I have to manually enter the date in to keep it updated. Is there any way to have the date enter in the field using a Java script when the page loads?

    Thank You

  6. #6
    QuietDean's Avatar
    Administrator

    Status
    Offline
    Join Date
    Oct 2000
    Location
    Bournemouth, UK
    Posts
    2,662
    'Allo mate, welcome to the forums.

    This code will display the date anywhere you put it -

    Code:
    <script language="JavaScript">
    
    
    today_date=new Date()
    
    monthday=today_date.getDate()
    month=today_date.getMonth() +1
    year=today_date.getYear()
    
    document.write(monthday+"/"+month+"/"+year)
    
    </script>
    Amend the document.write to get it in the format you need.
    If one of our members helps you, please click the icon to add to their reputation!
    No support via email or private message - use the forums!
    Before you ask, have you Searched?

  7. #7
    Derek's Avatar
    Be Yourself

    Status
    Offline
    Join Date
    Aug 2001
    Location
    St. George, Utah, USA
    Posts
    466
    Dean, do you use hidden form variables? I have never seen the use in them.

  8. #8
    QuietDean's Avatar
    Administrator

    Status
    Offline
    Join Date
    Oct 2000
    Location
    Bournemouth, UK
    Posts
    2,662
    I use them all the time.

    They are very handy for transporting information between pages.

    For instance, I have an area of me website that a user needs to be logged in to see. So they click the link, and they are not logged in. My script realises this, and instead of including the page they were going to, it brings up the login dialog include.
    The difference is, the login include is set to detect where they were going, so it adds a hidden form input to the login so that the login script knows where to send the user after they press 'submit'.
    Jobs a good 'un.
    If one of our members helps you, please click the icon to add to their reputation!
    No support via email or private message - use the forums!
    Before you ask, have you Searched?



Tags for this Thread