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 modelpopupextender and using OnOkscript="OnOk()" .
now in OnOk(), i m trying to run a click event of some button(image button)
coding is
ajax control
- <cc1:ModalPopupExtender ID="ErrorPopup" runat="server" PopupControlID="PopupPanel" BackgroundCssClass="backclass" TargetControlID="CancelButton" OkControlID="OkButton" OnOkScript="onOk()"
-
CancelControlID="CancelPopButton"></cc1:ModalPopupExtender>
ONOK()
- <script language="javascript" type="text/javascript">
-
function onOk()
-
{
-
document.getElementById("<%= CancelButton %>").OnClick();
-
-
}
and the button it is trying to run
- <asp:ImageButton ID="CancelButton" runat="server" skinid="buttonCancel" OnClick="CancelButton_Click" CssClass="button" />
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..