Is there any way to grab the ID of a clicked element in a script? I'm trying to create one script that I can attach to a ton of different clickable objects. Here's a pseudocode example:
var thisid = this.id; // this should return the id of the button, radio button, or clickable area that was clicked. HOWEVER, if you actually write the code like this, it attempts to return the ID of the window itself, not the clicked object. session.put("triggerID",thisid); // stores the ID as a variable session.utils.executeScript("wnd[0]/doClickAction"); // executes a script that will read the triggerID and run code depending on the ID
If I'm able to do something like this, I can have one script that I link to ALL clickable objects, rather than creating one for each.
Thanks in advance!