473,406 Members | 2,549 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Run click event of image button

121 100+
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
Expand|Select|Wrap|Line Numbers
  1. <cc1:ModalPopupExtender ID="ErrorPopup" runat="server" PopupControlID="PopupPanel" BackgroundCssClass="backclass" TargetControlID="CancelButton" OkControlID="OkButton" OnOkScript="onOk()"
  2.                   CancelControlID="CancelPopButton"></cc1:ModalPopupExtender>
ONOK()
Expand|Select|Wrap|Line Numbers
  1.  <script language="javascript" type="text/javascript">
  2.     function onOk()
  3.     {     
  4.         document.getElementById("<%= CancelButton %>").OnClick();  
  5.  
  6.     }
and the button it is trying to run
Expand|Select|Wrap|Line Numbers
  1. <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..
Oct 23 '08 #1
1 3341
acoder
16,027 Expert Mod 8TB
Show the client-side versions of your code. You can use the click() method (note the lower-case).
Oct 24 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Csaba2000 | last post by:
I want to be able to programatically click on the center of an <INPUT type=image ...> element (I only care about IE 5.5+). This should work regardless of whether IE has focus. Normally you would...
0
by: sakieboy | last post by:
In ASP.Net VB, is there a way to capture a Click on image event? Currently, I have a user control that consists of a button, calendar, and text box. User selects the button and the calendar...
2
by: Pete | last post by:
I have some funky form/event behavior. Access 97. Split frontend/backend, using Access security. I have the same behavior (or lack of behavior) for the pag_Click() event of two separate pages...
3
by: Benjamin Gavin | last post by:
Hi all, I recently stumbled upon a bug in the ASP.NET framework handling of ImageButton based postbacks. The issues derives from the fact that IE and Mozilla handle the case of a missing image...
3
by: TCORDON | last post by:
Why does the click event of an image button that submitts a form does not get fired when ENTER is pressend on a textbox of that form? How can I make this happen? Thanks
1
by: Andy Rose | last post by:
..Hi all, I want to catch an 'enter' keypress event on a web form and submit the form as if a button had been clicked rather than the default post back behaviour. I know the following javascript...
0
by: Oddball | last post by:
I have set up a page with uses two lots of image buttons, one for a collection and one for more images from that collection. I generate all the image buttons on page init (I know, but I...
1
by: TarDuk a memory beyond the life | last post by:
I am developing a shopping cart application for jwellary designing \ now i am displaying all the product in the table dynamically. and also show on image button as a add to cart after every item....
3
by: Andreas Wöckl | last post by:
HI Group! I have to programmatically create a user input form with various Checkbox and RadioButton lists - Beside every List I have to place an image button that is able to reset the...
2
by: chrisp | last post by:
I have an ASP.NET 2 page with a button that causes a credit card transaction to be authorised. The authorisation procedure may take a few seconds and so I want to prevent the user from clicking the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.