passing controlid in javascript
-
I need to pass the ID of the control calling a function in javascript function, to the function. I have a control ie. where myFunction is the following function in javascript and ??? would be the command used to pass its own id. function myFunction(controlName) { //I need controlName as the id of the control calling this function //do something... }
Regards, Tintin
-
I need to pass the ID of the control calling a function in javascript function, to the function. I have a control ie. where myFunction is the following function in javascript and ??? would be the command used to pass its own id. function myFunction(controlName) { //I need controlName as the id of the control calling this function //do something... }
Regards, Tintin
Never mind, I got it. 1.In the place off ??? you use "this". [without parentheses] 2. in function then say controlName.id [returns string] works fine now
Regards, Tintin