Showing posts with label Firefox. Show all posts
Showing posts with label Firefox. Show all posts

Wednesday, November 11, 2009

Working around Adobe Download Manager issues in Firefox

With the Firefox 3.5.5 update I was prompted to update my Adobe Flash Player to version 10. I went through the process with the Adobe Download Manager but only got as far as Status "Connecting..." and then "Network error".

I found a complete download at the Adobe Flash Player Support Center. Under the Flash Player 10 section I downloaded the Adobe Flash Player 10 Update for Windows and Macintosh (ZIP, 44 MB) and installed the plugin from flash_player_update3_flash10.zip\Players\Release\Install Flash Player 10 Plugin.exe.

Friday, January 23, 2009

ASP.NET 2.0 Multiline TextBox submits on enter in Firefox

I'm sure I've run into this issue before. If a form contains a asp:TextBox with TextMode="MultiLine" and you press enter in the textbox to create a new line the entire form gets submitted to the server in Firefox.

In my case Firebug revealed that the textarea was nested in a asp:Panel where onkeypress="javascript:return WebForm_FireDefaultButton(event, 'ctl03_ctl05_btnSubmit')"

A little Googling on FireDefaultButton reminded me that its implementation is IE specific. The following article shows how to register a client script include that will update the function.

Multi-line Text boxes and the DefaultButton in ASP.NET 2.0

The same issue is also discussed on StackOverflow: Asp.Net Form DefaultButton Error in Firefox and StackOverflow: enter key to insert newline in asp.net multiline textbox control

function WebForm_FireDefaultButton(event, target) {
 if (event.keyCode == 13) {
 var src = event.srcElement || event.target;
 if (!src || (src.tagName.toLowerCase() != "textarea")) {
 var defaultButton;
 if (__nonMSDOMBrowser) {
 defaultButton = document.getElementById(target);
 }
 else {
 defaultButton = document.all[target];
 }
 if (defaultButton && typeof(defaultButton.click) != "undefined") {
 defaultButton.click();
 event.cancelBubble = true;
 if (event.stopPropagation) event.stopPropagation();
 return false;
 }
 }
 }
 return true;
}