
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.
Bookmarks