943,831 Members | Top Members by Rank

Ad:
  • ASP Discussion Thread
  • Unsolved
  • Views: 3042
  • ASP RSS
May 25th, 2009
0

onClick code behind not getting called--Firefox

Expand Post »
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.

ASP Syntax (Toggle Plain Text)
  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.
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
musman007 is offline Offline
9 posts
since Feb 2009
May 25th, 2009
0

Re: onClick code behind not getting called--Firefox

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().
Reputation Points: 8
Solved Threads: 0
Junior Poster in Training
FaridMasood is offline Offline
59 posts
since Mar 2007
May 25th, 2009
0

Re: onClick code behind not getting called--Firefox

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
Reputation Points: 10
Solved Threads: 0
Newbie Poster
musman007 is offline Offline
9 posts
since Feb 2009
Jun 4th, 2009
0

Re: onClick code behind not getting called--Firefox

You should ask this question over in the .net forum....
Reputation Points: 37
Solved Threads: 18
Junior Poster
agrothe is offline Offline
151 posts
since Jun 2006

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in ASP Forum Timeline: Need Help with HTTP strings
Next Thread in ASP Forum Timeline: save as draft option





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC