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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Urgent - newbie needs help

Status
Not open for further replies.

Pottypotsworth

Programmer
Jul 22, 2002
5
GB
Hi guys

I need to know how I can get the calling objects name in a function or even better the calling objects id without having to add the id as an parameter for the funtion.


i got something like this

<span id=somename><a href=javascript:functionname(parm1, parm2, parm3)></span>
function somename(p1,p2,p2)
{
get calling objects id
do something
}

But I NEED to resolve it in the function without having to add a parm for it, and it has to replace an old function

please can u help?? i am a newbie
 
i'm not sure how to do what you want, but you might want to change the link like this: ><a href=&quot;javascript:void(0)&quot; onClick=&quot;functionname(parm1, parm2, parm3)&quot;></a> -Greg :-Q
 
may be smth like this?

<span onclick=&quot;alert(this.id)&quot; id=nana style=&quot;width:20&quot;>blah blah<span>

(ie only) Victor
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top