aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes how to get the object name when i pass parameter Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "how to get the object name when i pass parameter " this" ?" Watch "how to get the object name when i pass parameter " this" ?" New topic
Author

how to get the object name when i pass parameter " this" ?

Nakata kokuyo
Ranch Hand

Joined: Apr 13, 2005
Posts: 439
hi, is it possible that when we pass a "this" as function parameter, then we can get back the object name ?

for instance,

if we have checkbox field as below


and when user click select or unselect checkbox, and the selectCheckBox(this) function will call .. but then can we get the name of checkbox which is in this case as "chkbox1" ?

thank you for answering
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
As I said before the posts got deleted due to the server problem,

You would just do

function selectCheckBox(xElem){
alert(xElem.name);
}
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to get the object name when i pass parameter " this" ?