473,739 Members | 3,096 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 3155
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.goo glegroups.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:no ne 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.goo glegroups.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.m icrosoft.com> wrote in
message news:10******** *************** ***********@mic rosoft.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:no ne 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.goo glegroups.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
1850
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 events are not triggered?
4
3990
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 was endeavoring to create a custom user control to make things a bit simpler, but she noticed that her Page_Load eventhandler was firing twice. So after long hours of research and experimentation, I stumbled upon, imho, is quite the discovery. ...
5
4933
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 perfectly. I can't find any documentation regarding the load event not firing when a form is displayed using the showdialog method.
7
23096
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 a form and load values into controls without any events firing, then re-enable the form. -- Scott Emick Web Programmer
0
1854
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 child form implements an event handler for the Resize event. Inside BaseApplicationForm.InitializeComponent, this.ClientSize is set to a value. On most of our developers' machines, this.ClientSize = ....; does NOT fire the Resize event, which makes...
3
1759
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 supposed to do this with Visual Studio. If I go to the class view, and click on form1 a bunch of properties show up for the form, but if I click on either the events button in the properties
2
3924
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 well, so at times it is tempting just to port parts of it over mostly as-is. In fact, one MSDN article I read suggested using straight HTML wherever possible to make the app more efficient and less resource demanding. On one page there are 2...
6
4547
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. I can easily create an event handler for the SizeChanged form level event, the problem is if the user is using a mouse drag to resize the form this event is firing every few milliseconds or what have you until the user stops the drag process. ...
19
3226
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 these Validating Events are also fired when either the child form or the main (parent) form Close icon is clicked. And I need for these events to know if they are being invoked because the app (or child window) is being closed. I have set a boolean...
0
8969
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8792
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9479
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9337
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9209
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6054
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4570
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4826
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3280
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.