473,386 Members | 1,997 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,386 software developers and data experts.

Web form event handler not firing?

I am having a strange problem on a web form. I have an image button
with an OnClick event handler. When I click the image the event isn't
being called in the code behind when browsing in firefox. I get the
postback but I never have the event called. It works fine in i.e.

Nov 19 '05 #1
3 3129
Jeff:
You didn't provide us with much detail (like sample code), but there is a
known bug in FireFox 1.0 where, if you leave the ImageUrl blank, postback
won't fire.
https://bugzilla.mozilla.org/show_bug.cgi?id=258621

So this is assuming you aren't specifying an image...

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/
<je******@yahoo.com> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com...
I am having a strange problem on a web form. I have an image button
with an OnClick event handler. When I click the image the event isn't
being called in the code behind when browsing in firefox. I get the
postback but I never have the event called. It works fine in i.e.

Nov 19 '05 #2
Hi all,

Karl: thanks for the info on the bug, you were dead on. Interesting to note
that the posters on that site blame ASP.Net for this.
In your post you note that if the URL for the image is not good, the
arguments do not pass. Note that if you hide the button (style:display:none),
you also get the negative result in Mozilla/Firefox/Netscpape, even if the
image URL/Src is good.

I had a similar situation which I will post for the sake of others searching:

I had an Html Server Control <input type="image" runat="server" ... on which
I put an onclick event handler as well as the onserverlick. I had another
image button on my page as well. In Mozilla/Netscape the button without the
client onclick submitted fine and it's server-side code would run, but not
the button with the client-side event handler. Note: All worked fine in IE!

The client side code "swapped" them image to another one (hiding the image
using style=dispay:none on the button before form submittal to prevent
multiple form submissions/double clicks) hence the lack of arguments to the
server side event handler.

I ended up not hding the button but placing another over top to catch the
clicks...and so it worked fine after that in all browsers.
Well I had a problem there too in that the Divs I was using wouldn't change
thier z-index in IE 6, but worked fine in Mozilla/Firefox/Netscape (I had the
position set to relative!) Oh well, after more searching I got my solution to
that.

Thanks,
Stephen

"Karl Seguin" wrote:
Jeff:
You didn't provide us with much detail (like sample code), but there is a
known bug in FireFox 1.0 where, if you leave the ImageUrl blank, postback
won't fire.
https://bugzilla.mozilla.org/show_bug.cgi?id=258621

So this is assuming you aren't specifying an image...

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/
<je******@yahoo.com> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com...
I am having a strange problem on a web form. I have an image button
with an OnClick event handler. When I click the image the event isn't
being called in the code behind when browsing in firefox. I get the
postback but I never have the event called. It works fine in i.e.


Nov 19 '05 #3

its not a firefox bug, its an asp.net bug.

if there is no image and thus no image click (or return is used), it makes
no sense to send the x and y coordinates (as there aren't any). the image
value is posted. asp.net has a bug, where it only looks for the x and y
values, not the image value.

-- bruce (sqlwork.com)

"Stephen J. Kladich" <St*************@discussions.microsoft.com> wrote in
message news:10**********************************@microsof t.com...
Hi all,

Karl: thanks for the info on the bug, you were dead on. Interesting to
note
that the posters on that site blame ASP.Net for this.
In your post you note that if the URL for the image is not good, the
arguments do not pass. Note that if you hide the button
(style:display:none),
you also get the negative result in Mozilla/Firefox/Netscpape, even if the
image URL/Src is good.

I had a similar situation which I will post for the sake of others
searching:

I had an Html Server Control <input type="image" runat="server" ... on
which
I put an onclick event handler as well as the onserverlick. I had another
image button on my page as well. In Mozilla/Netscape the button without
the
client onclick submitted fine and it's server-side code would run, but not
the button with the client-side event handler. Note: All worked fine in
IE!

The client side code "swapped" them image to another one (hiding the image
using style=dispay:none on the button before form submittal to prevent
multiple form submissions/double clicks) hence the lack of arguments to
the
server side event handler.

I ended up not hding the button but placing another over top to catch the
clicks...and so it worked fine after that in all browsers.
Well I had a problem there too in that the Divs I was using wouldn't
change
thier z-index in IE 6, but worked fine in Mozilla/Firefox/Netscape (I had
the
position set to relative!) Oh well, after more searching I got my solution
to
that.

Thanks,
Stephen

"Karl Seguin" wrote:
Jeff:
You didn't provide us with much detail (like sample code), but there is a
known bug in FireFox 1.0 where, if you leave the ImageUrl blank, postback
won't fire.
https://bugzilla.mozilla.org/show_bug.cgi?id=258621

So this is assuming you aren't specifying an image...

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/
<je******@yahoo.com> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com...
> I am having a strange problem on a web form. I have an image button
> with an OnClick event handler. When I click the image the event isn't
> being called in the code behind when browsing in firefox. I get the
> postback but I never have the event called. It works fine in i.e.
>


Nov 19 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Nenad Dobrilovic | last post by:
Hi, is there any way to find out how form was closed (by calling it's method Close() or by clicking on the 'close' button in control box)? Also, can I close the form in that way that Cloing/Closed...
4
by: Seraph | last post by:
Again, I'm rather new here, so if I fail to follow any etiquette, please forgive me and let me know what I've done wrong, but I think this might interest quite a few people. One of my colleaques...
5
by: Engineerik | last post by:
I have a login form which I want to display with the showdialog method. When I do that the event handler for the load event does not run. If I use the show method the load event handler runs...
7
by: Scott Emick | last post by:
How can I disable events for the controls on a form? I tried setting the form's enable property to false, but that doesn't stop events from firing on its controls. I need to temporarily disable...
0
by: Patrick Lioi | last post by:
We have form that is used as the base class of all of our forms, let's call it BaseApplicationForm. We have another form, say ChildApplicationForm that inherits from BaseApplicationForm. The...
3
by: A Wieser | last post by:
I created a new Windows Forms Application, with a blank form. The first thing I want to do is override OnPaint, and draw a line across the window. I can't for the life of me figure out how I'm...
2
by: John Kotuby | last post by:
Hi guys, I am converting a rather complicated database driven Web application from classic ASP to ASP.NET 2.0 using VB 2005 as the programming language. The original ASP application works quite...
6
by: JDeats | last post by:
I have a WinForms based application written for the .NET Framework 2.0 and in this application I need to be able to be able to take some action in code when the user finishes resizing the form. ...
19
by: zacks | last post by:
I have a .NET 2.0 MDI application where the child form has a Tab Control. Each of the Tab in the Tab Control has a Validating event to handle what it should do when the user changes tabs. But...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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...
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.