views:

27

answers:

0

I have a user control with a javascript function which references some controls within the user control.

This user control works perfectly when there is only one instance of it, but I'm now building a page where I have two instances of the user control.

In IE7, it works fine, but in FireFox, it is getting confused that there is two functions of the exact same name and signature. So on UserControl1, it'll be running the function in UserControl2 and modifying that content.

I'm thinking my best solution would be to pass the clientID of the components I need TO the function instead of just directly referencing it in the function.

How would I do that?

The signature of the javascript function is like this

function nodeClicking(sender, args)

and I'm calling it in an event like this

 <telerik:RadTreeView runat="server" ID="OrgUnitTreeView" OnInit="TreeViewLoad" 
                    OnClientNodeClicking="**nodeClicking**" EnableViewState="true"
                    DataTextField = "OrganisationUnitName" DataValueField = "OrganisationUnitCode"
                    DataFieldParentID = "ParentOrganisationUnitCode" DataFieldID = "OrganisationUnitCode">

How do I add extra variables to the function signature.