Results 1 to 4 of 4

Thread: Jason's date input calendar

  1. #1
    Join Date
    May 2006
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Jason's date input calendar

    Hi,
    can you help me to put this script to "talk" with a field in database?

    this script send a message (alert) with the select date. I want not an alert box but a "form name" for save in my sql server (with other fileds in the interface i created).

    thank you,
    Jorge Gomes

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Then you would need to give the form and fields names if they don't already have them and make a submit button for the form. The form's action should be set to, I believe, post. This should all be done as you would for any other form that you wanted to do this.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    May 2006
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    good morning,
    sorry, but I think i didn't explain well my intended.

    this script allows to choose a date. When clicking in the button appears an alert with that date.
    I don't want to click in the button!!!! I just want to have other fields to fill and in the end of everything an only button to record.

    (ex: name:
    adress:
    date: (this script)
    ........

    SAVE (button for click)

    When recording (press SAVE button) I want that all the fields that I filled are inserted in my SQL.

    Thus, i need to place the date that the script gives me in a text box instead of alert.
    (in my ActionSave.asp i have request.form ("date"), request.form("name"), request.form("adress"),....).

    Thank you!
    Jorge Gomes

  4. #4
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Quote Originally Posted by jmlg
    When recording (press SAVE button) I want that all the fields that I filled are inserted in my SQL.

    Thus, i need to place the date that the script gives me in a text box instead of alert.
    Well, how do you normally insert to MYSQL? The date items' values are already in text inputs and selects, as well as concatenated in a hidden input.

    Originally from the Demo Page:
    The script then creates a corresponding hidden field containing the actual chosen date for easy passing along with the rest of your form.
    The alert is just for demo purposes anyway. You can use whatever kind of button (including submit) that you want. For example (from the demo):

    Code:
    <form>
    
    <script>DateInput('orderdate', true, 'DD-MON-YYYY')</script>
    
    <input type="button" onClick="alert(this.form.orderdate.value)" value="Show date value passed">
    
    </form>
    Used with the parameter 'orderdate' for the name of the hidden input means that:

    this.form.orderdate.value

    will be the date value and that its name will be 'orderdate'. What you do with it is up to you.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

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
  •