On my umbraco site I use standard
various asp.net controls such as checkboxes, calendar controls, and hyperlink
controls etc.
They all work flawlessly in IE
6&7 and in Safari. However, in Firefox both on Mac and PC, nothing happens
when the control is supposed to do a postback.
How do I solve this issue? Is it an
Umbraco thing, or what?
On my umbraco site I
use standard
various asp.net controls such as checkboxes, calendar controls, and
hyperlink
controls etc.
They all work
flawlessly in IE
6&7 and in Safari. However, in Firefox both on Mac and PC, nothing
happens
when the control is supposed to do a postback.
How do I solve this
issue? Is it an
Umbraco thing, or what?
Javascript is enabled - it doesn't work in any of the FF browser I have tested on (about 5-6 different - PCs and Macs).
In the source code the following is inserted somewhere. I don't know where it is inserted, but it must be something umbraco writes, since I haven't written it and I can't find "theForm" anywhere... Could this be why it doesn't work in FF?
Source code:
<script type="text/javascript"> //<![CDATA[ var theForm = document.forms['aspnetForm']; if (!theForm) { theForm = document.aspnetForm; } function __doPostBack(eventTarget, eventArgument) { if (!theForm.onsubmit || (theForm.onsubmit() != false)) { theForm.__EVENTTARGET.value = eventTarget; theForm.__EVENTARGUMENT.value = eventArgument; theForm.submit(); } } //]]> </script>
This is the part ASP.net renders for you, nothing Umbraco related, Please check if you don't have multiple forms on your page. ASP.NET only works with 1 form.
But if I have more than more form, would't I get an error? It works in IE and Safari. In my masterpage I have a form, other than that I haven't got any forms...
Hi Kersten. What do you mean that nothing happens? Is there no postback? Are you using an updatepanel perhaps and missing a visual cue? Did you verify with Fiddler that there is no postback? Does your control use autopostback="true" ?
I use a standard asp.net control. I use set autopostback="true" on for instance the Calendar control. I don't use an updatepanel (at least I don't think so!).
Here is an example: http://www.yellowfee.dk/kontakt.aspx the "Sign-in" link is an asp hyperlink. I works in IE and safari where it lets the user go to the log-in page, but in FF nothing happens when clicking the link...
Sorry - the control is actually an asp LoginStatus control - however behavior is the same on dropdowns, calendar controls etc. when trying to do an autopostback.
The only time i have had postback problems in firefox is when using imagebutton control and not supplying image for the button or incorrect url for the image. In those instances i have found the page does not post back. Can you take a look if in firefox you are getting any javascript errors.
Yehaaa! The Form-thing worked - Thank you Morten. Now the asp dropdowns, checkboxes and links work perfectly!
I still don't get any autopostback from my imagebuttons, I'll investigate if I use a wrong url for the image as you describe Ismail... Is there anything that I should pay attention to? Currently I'm just using the imagebutton property-window-thing to reference an image in my /Images folder in my project. On the server I have the same image in my /Images folder on the server.
Problem with postback in Firefox with asp.net controls
<!-- /* Font Definitions */ @font-face {font-family:Times; panose-1:2 0 5 0 0 0 0 0 0 0; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:3 0 0 0 1 0;} @font-face {font-family:Cambria; panose-1:2 4 5 3 5 4 6 3 2 4; mso-font-charset:0; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:3 0 0 0 1 0;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {mso-style-parent:""; margin:0cm; margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:12.0pt; font-family:"Times New Roman"; mso-ascii-font-family:Cambria; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:Cambria; mso-fareast-theme-font:minor-latin; mso-hansi-font-family:Cambria; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi; mso-fareast-language:EN-US;} p {margin:0cm; margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:10.0pt; font-family:"Times New Roman"; mso-ascii-font-family:Times; mso-fareast-font-family:Cambria; mso-fareast-theme-font:minor-latin; mso-hansi-font-family:Times; mso-bidi-font-family:"Times New Roman";} @page Section1 {size:612.0pt 792.0pt; margin:3.0cm 2.0cm 3.0cm 2.0cm; mso-header-margin:35.4pt; mso-footer-margin:35.4pt; mso-paper-source:0;} div.Section1 {page:Section1;} -->
Hi forum,
On my umbraco site I use standard various asp.net controls such as checkboxes, calendar controls, and hyperlink controls etc.
They all work flawlessly in IE 6&7 and in Safari. However, in Firefox both on Mac and PC, nothing happens when the control is supposed to do a postback.
How do I solve this issue? Is it an Umbraco thing, or what?
Hope that you can help, or at least clarify...
Kind regards
-Kresten
Wow - let's try again:
- - - - - - - - - -
Hi forum,
On my umbraco site I use standard various asp.net controls such as checkboxes, calendar controls, and hyperlink controls etc.
They all work flawlessly in IE 6&7 and in Safari. However, in Firefox both on Mac and PC, nothing happens when the control is supposed to do a postback.
How do I solve this issue? Is it an Umbraco thing, or what?
Hope that you can help, or at least clarify...
Kind regards
-Kresten
Hi Kresten
Can you perhaps show us some of the code?
/Jan
Is javascript by any chance disabled in the Firefox browser, or do you get any javascript errors?
Javascript is enabled - it doesn't work in any of the FF browser I have tested on (about 5-6 different - PCs and Macs).
In the source code the following is inserted somewhere. I don't know where it is inserted, but it must be something umbraco writes, since I haven't written it and I can't find "theForm" anywhere... Could this be why it doesn't work in FF?
Source code:
This is the part ASP.net renders for you, nothing Umbraco related, Please check if you don't have multiple forms on your page. ASP.NET only works with 1 form.
Cheers,
Richard
But if I have more than more form, would't I get an error? It works in IE and Safari. In my masterpage I have a form, other than that I haven't got any forms...
You only get an error when you have two forms with the runat=server attribute. Multiple forms on an asp.net page can cause strange issues.
Cheers,
Richard
Ok - thanks for clarifying. I have one form in my MasterPage. If I remove that, the postback doesn't work in IE either.
Is there anything else, I can be doing wrong?
-Kresten
Hi Kersten. What do you mean that nothing happens? Is there no postback? Are you using an updatepanel perhaps and missing a visual cue? Did you verify with Fiddler that there is no postback? Does your control use autopostback="true" ?
Regards, Bart
Hi Bart,
I use a standard asp.net control. I use set autopostback="true" on for instance the Calendar control. I don't use an updatepanel (at least I don't think so!).
Here is an example: http://www.yellowfee.dk/kontakt.aspx the "Sign-in" link is an asp hyperlink. I works in IE and safari where it lets the user go to the log-in page, but in FF nothing happens when clicking the link...
?
Sorry - the control is actually an asp LoginStatus control - however behavior is the same on dropdowns, calendar controls etc. when trying to do an autopostback.
Kresten, you have your form tag ouside the html tags like this:
You need to put your form inside the body tag:
Hi Kresten. Perhaps you can try setting the navigateURL attribute of the hyperlink to simply login.aspx? Does that work?
Grtz, Bart
Hi Kresten. Perhaps you can try setting the value of navigateURL in the hyperlink control to simply login.aspx? Does that work?
Regards, Bart
Kresten,
The only time i have had postback problems in firefox is when using imagebutton control and not supplying image for the button or incorrect url for the image. In those instances i have found the page does not post back. Can you take a look if in firefox you are getting any javascript errors.
Regards
Ismail
Yehaaa! The Form-thing worked - Thank you Morten. Now the asp dropdowns, checkboxes and links work perfectly!
I still don't get any autopostback from my imagebuttons, I'll investigate if I use a wrong url for the image as you describe Ismail... Is there anything that I should pay attention to? Currently I'm just using the imagebutton property-window-thing to reference an image in my /Images folder in my project. On the server I have the same image in my /Images folder on the server.
Kind regards
-Kresten
Kresten,
Make sure you can see an image. if the url is wrong or you don't have permissiosn to view the image then imagebutton will not work in firefox.
Regards
Ismail
is working on a reply...