passing parameter in JavaScript - passing parameter on the onclick event of the text box

They have: 5,633 posts

Joined: Jan 1970

I have a textbox named 'txtdate'
On the onclick event of the text box I need to pass parameters the formname and the textbox name to a funtion called Calender.
how would I achieve that?
Help!!

They have: 11 posts

Joined: Jul 1999

Minnie,

<Input type="text" name="txtdate" size="20" maxlength="30" onChange="Calendar(this.value)">

....
....
....
Then in the function..

function Calendar(thestring) {
do whatever..

I am not sure about the onClick event being used for a "text" object but normally it is used for a "button" object.

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.