onClick code behind not getting called--Firefox

Reply

Join Date: Feb 2009
Posts: 5
Reputation: musman007 is an unknown quantity at this point 
Solved Threads: 0
musman007 musman007 is offline Offline
Newbie Poster

onClick code behind not getting called--Firefox

 
0
  #1
May 25th, 2009
Hey Guys,
I am trying to call codebehind onclick event from my markup from Firefox works find in IE. I hv created an image button and onClientClick I m calling a javascript function after checking some fields it should call onClick event in code behind but unfortunately its not, Please help.

  1. <asp:ImageButton ID="SubmitChanges" runat="server" ImageUrl="../images/btn_images/btn_large_submitchanges_ng.gif" OnClientClick="return DoEdits();" />
  2.  
  3. html
  4. function DoEdits(){
  5. //check fields
  6. return true;
  7. }
  8. cde behind
  9. Public Sub SubmitChanges_Click(ByVal sender As Object, ByVal e As System.Web.UI.ImageClickEventArgs) Handles SubmitChanges.Click
  10. ' code to process.
  11. End Sub
Last edited by peter_budo; May 25th, 2009 at 4:24 am. Reason: Keep It Organized - For easy readability, always wrap programming code within posts in [code] (code blocks) and [icode] (inline code) tags.
Reply With Quote Quick reply to this message  
Join Date: Mar 2007
Posts: 59
Reputation: FaridMasood is an unknown quantity at this point 
Solved Threads: 0
FaridMasood's Avatar
FaridMasood FaridMasood is offline Offline
Junior Poster in Training

Re: onClick code behind not getting called--Firefox

 
0
  #2
May 25th, 2009
You need to verify your javascript code if it is working correctly?

I think you are not setting the return type for JS function DoEdits().
Thanks and Best of Lusk,

Farid ud din Masood
MS.c (CS)
University of Agriculture, Faisalabad
Reply With Quote Quick reply to this message  
Join Date: Feb 2009
Posts: 5
Reputation: musman007 is an unknown quantity at this point 
Solved Threads: 0
musman007 musman007 is offline Offline
Newbie Poster

Re: onClick code behind not getting called--Firefox

 
0
  #3
May 25th, 2009
Thanks for reply Faisal,
But I have tried removing DOedits function. It never hits submit event, and do edit is a javascript function how can I set a return type?

Thx
Reply With Quote Quick reply to this message  
Join Date: Jun 2006
Posts: 119
Reputation: agrothe is an unknown quantity at this point 
Solved Threads: 14
agrothe's Avatar
agrothe agrothe is offline Offline
Junior Poster

Re: onClick code behind not getting called--Firefox

 
0
  #4
Jun 4th, 2009
You should ask this question over in the .net forum....
------------------------------------------------------------
If you see no coffee in my immediate vicinity, speak slowly and use small words....
ConnectNL Directory | Blog
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the ASP Forum
Thread Tools Search this Thread



Tag cloud for ASP
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC