Reputation: 5566
This is the code for an input text field. What I want is to call the "checkDateFormat" function with the text input as a parameter when the user leaves the field.
Here is the code I've written:
Fecha de prueba: <input type="text" name="date_t" id="date_t" value="22/08/2014" onblur="checkDateFormat(this.date_t.value)"><br>
However I'm sure the function isn't even called.
What am I doing wrong?
Upvotes: 7
Views: 27701
Reputation: 7768
Try to use,
onblur="checkDateFormat(this.value)"
Instead of
onblur="checkDateFormat(this.date_t.value)"
Upvotes: 16