Set input value with onclick event on grid view

Hi

Testing Scriptcase 9 so 1% of knowledge, may be this is a stupid question but…

I have a field (MySQL) in datetime format but the calendar picker allways return the day with 00:00:00 time and I need at least the current time.

I’ve tried to add a onclick event on the input box so when the user clicks the value is changed to current datetime (document.getElementById(“tx”).value=…) but this is a gridview so the ID changes every time depending of the row selected so, how can I get the ID of the element that invokes the onclick event to add to the javascript code?