Ajaxtoolkit Popup Control Extender and javascript function

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • tshad

    Ajaxtoolkit Popup Control Extender and javascript function

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

    <asp:ImageButto n ID="ibPractitio ners" runat="server"
    ImageUrl="~/images/icons/user_16.gif"
    ToolTip="Displa y Practitioners" Visible='<%#
    Convert.ToBoole an(Eval("Practi tionersVisible" )) %>'
    CommandName="pr actitioners" CssClass="actio n" />

    <cc1:PopupContr olExtender ID="mPopupContr olExtender" runat="server"
    TargetControlID ="ibPractitione rs"
    PopupControlID= "pnlPractitione rs" />

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

    <asp:ImageButto n ID="ibPractitio ners" runat="server"
    ImageUrl="~/images/icons/user_16.gif"
    ToolTip="Displa y Practitioners" Visible='<%#
    Convert.ToBoole an(Eval("Practi tionersVisible" )) %>'
    CommandName="pr actitioners" CssClass="actio n"
    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


  • tshad

    #2
    Re: Ajaxtoolkit Popup Control Extender and javascript function

    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

    "tshad" <tshad@dslextre me.comwrote in message
    news:uwiPzIStIH A.4376@TK2MSFTN GP06.phx.gbl...
    >I am trying to use a popup control extenter which works fine the following
    >way where we have an object and a popcontrolexten der objec that points to
    >this object.
    >
    <asp:ImageButto n ID="ibPractitio ners" runat="server"
    ImageUrl="~/images/icons/user_16.gif"
    ToolTip="Displa y Practitioners" Visible='<%#
    Convert.ToBoole an(Eval("Practi tionersVisible" )) %>'
    CommandName="pr actitioners" CssClass="actio n" />
    >
    <cc1:PopupContr olExtender ID="mPopupContr olExtender" runat="server"
    TargetControlID ="ibPractitione rs"
    PopupControlID= "pnlPractitione rs" />
    >
    The problem is I need to add a onClientClick event and this doesn't get
    called when the extender is tied to it:
    >
    <asp:ImageButto n ID="ibPractitio ners" runat="server"
    ImageUrl="~/images/icons/user_16.gif"
    ToolTip="Displa y Practitioners" Visible='<%#
    Convert.ToBoole an(Eval("Practi tionersVisible" )) %>'
    CommandName="pr actitioners" CssClass="actio n"
    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
    >
    >

    Comment

    Working...