hello,
i m new to javascript and i think what i am trying to do cant be accomplished w/o it.
i am using ajax modelpopupexten der and using OnOkscript="OnO k()" .
now in OnOk(), i m trying to run a click event of some button(image button)
coding is
ajax control
ONOK()
and the button it is trying to run
error i am getting is cancelbutton NUll
i have tried it with1) replacing cancelButton text with something like ct100blah..... 2) Onclick with Click
nothing seems to work
any help..
i m new to javascript and i think what i am trying to do cant be accomplished w/o it.
i am using ajax modelpopupexten der and using OnOkscript="OnO k()" .
now in OnOk(), i m trying to run a click event of some button(image button)
coding is
ajax control
Code:
<cc1:ModalPopupExtender ID="ErrorPopup" runat="server" PopupControlID="PopupPanel" BackgroundCssClass="backclass" TargetControlID="CancelButton" OkControlID="OkButton" OnOkScript="onOk()" CancelControlID="CancelPopButton"></cc1:ModalPopupExtender>
Code:
<script language="javascript" type="text/javascript"> function onOk() { document.getElementById("<%= CancelButton %>").OnClick(); }
Code:
<asp:ImageButton ID="CancelButton" runat="server" skinid="buttonCancel" OnClick="CancelButton_Click" CssClass="button" />
i have tried it with1) replacing cancelButton text with something like ct100blah..... 2) Onclick with Click
nothing seems to work
any help..
Comment