Firstly, I'd encourager you not to use inline Javascript. Try to use UJS where possible i.e. instead of adding a onchange="blah". Try adding an event handler, in prototype I think this is done using observe.
Secondly, Javascript doesn't have a Date.today
call. so this will error. Try building it up, so start with just alerting if the onchange function has been fired. Then alert the value of the text box and the value of today (new Date()
) Then the result of the equality check.