Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

knowing elements 1

Status
Not open for further replies.

ace21

Programmer
Joined
Jul 11, 2001
Messages
4
Location
US
If you call an OnClick how can you tell the name of the element passed to it.

I don't know the name of the element because it is generated in a loop. So is there way to pass the element like there is to pass which form. this.form

Ace21
 
i'm not sure i understand your question
if you meant : how to pass an element when calling onclick on that element, the answer is : this
as in : <any_element onclick=&quot;any_function(this)&quot;>
any_function will receive any_element as a parameter
remember to test the type of any_element before doing anything with it - just to make sure it's one of the kind you expect
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top