Ajaxtoolkit Popup Control Extender and javascript function

T

tshad

I am trying to use a popup control extenter which works fine the following
way where we have an object and a popcontrolextender objec that points to
this object.

<asp:ImageButton ID="ibPractitioners" runat="server"
ImageUrl="~/images/icons/user_16.gif"
ToolTip="Display Practitioners" Visible='<%#
Convert.ToBoolean(Eval("PractitionersVisible")) %>'
CommandName="practitioners" CssClass="action" />

<cc1:popupControlExtender ID="mPopupControlExtender" runat="server"
TargetControlID="ibPractitioners"
PopupControlID="pnlPractitioners" />

The problem is I need to add a onClientClick event and this doesn't get
called when the extender is tied to it:

<asp:ImageButton ID="ibPractitioners" runat="server"
ImageUrl="~/images/icons/user_16.gif"
ToolTip="Display Practitioners" Visible='<%#
Convert.ToBoolean(Eval("PractitionersVisible")) %>'
CommandName="practitioners" CssClass="action"
onClientClick="logName(this)"/>

Here logName(this) never gets called.

I want this function to be called before the popup extender so I can log
this action.

Is there a way to do this?

Thanks,

Tom
 
T

tshad

I just found out that not only does it disable the onClientClick event of
the TargetControl, but also others. In this case, my images are in a
DataList and the OnItemCommand does not fire for the icon that has the PCE
connected to it. All the others fire fine. As soon as I point the
TargetControlID at a different image, the event will not fire for that one
but now it will for the one that didn't work before.

Why is this?

Thanks,

Tom
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,904
Latest member
HealthyVisionsCBDPrice

Latest Threads

Top