By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,369 Members | 950 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,369 IT Pros & Developers. It's quick & easy.

Call Javascript function on img click

P: 5
Hi All,


How would we call Javascript function on img click?
can we call function which define in codebehind page (.vb page) on img click?


Regards
Santosh
Apr 27 '07 #1
Share this Question
Share on Google+
1 Reply


Frinavale
Expert Mod 5K+
P: 9,731
Hi All,


How would we call Javascript function on img click?
can we call function which define in codebehind page (.vb page) on img click?


Regards
Santosh

I'd recommend using an ImageButton because it will be easier to add JavaScript to it.
If you use an ImageButton just enter the JavaScript function into its "onClientClick" property.

Please note that the ImageButton will PostBack to your program.

Let me know if this is helpful because there are other ways to solve this problem.

-Frinny
Apr 27 '07 #2

Post your reply

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