![]() |
Small bit of Javscript help needed...
Hey, I'm trying to populate one textbox with todays date formatted as YYYY-MM-DD.
So far, i have the following Javascript that seems not to work correctly: Code:
<script type="text/javascript">The <body> tag includes OnLoad=DateContent() to make the function fire also. I know the function to get the date works, but, getting it to populate the textbox fails. Any ideas? ---------- Post added at 20:18 ---------- Previous post was at 19:37 ---------- C'mon, anyone? ;) Any other solution would work too, so, if you don't know what's wrong, but have a suggestion, let me know! ---------- Post added at 20:27 ---------- Previous post was at 20:18 ---------- God i'm a dipstick, needed to add id=textfield to the actual text field :o: |
Re: Small bit of Javscript help needed...
Get rid of the ' ' like
document.getElementById(textfield).value = yyyy+'-'+mm+'-'+dd; |
| All times are GMT +1. The time now is 07:29. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
All Posts and Content are © Cable Forum