ASP.NET Technicians! Having Trouble With Your Web-Site & Firefox?

ASP.NET is an excellent development environment for creating web-sites with… even with its idiosyncrasies. However, making an ASP.NET site work with the Firefox browser can be a maddening experience; especially when you find the changes required are so slight and often ambiguous as a result.

This experience has happened to me more than I care to remember. And recently, I had the pleasure of reliving the anxiety associated with one of these tiny “gotchas” in one of my web-pages. It worked just fine in Internet Explorer but once I tested it under Firefox, I knew I was going to be in for another long debugging session.

What was the problem? Something we most likely take for granted as ASP.NET developers; the use of the “Element.innerText” property to extract information from a label control. Seems fairly innocuous enough as this property appears to be pretty standard fare for accessing portions of text in the HTML-DOM. This would be true except for the fact that Firefox has never heard of the “innerText” property and as a result doesn’t support it.

Firefox doesn’t do a lot of things we have all gotten used to with Internet Explorer, such as supporting my favorite scripting language, VBScript. Sorry, but I never liked JavaScript… However, I love Firefox and do a lot of testing with it against my own web development.

After a frustrating hour or two of research I finally found two articles on the Code-Project that not only solved this problem by providing a JavaScript function to emulate the “innerText” property but may help a lot of us ASP.NET developers in general experience a whole lot less pain when it comes to using our JavaScript skills with the Firefox browser.

So if you are currently undergoing one of these experiences with Firefox than rush over to the links below and find out if they are “the cure for what ails ya!”…

Black Falcon

http://www.codeproject.com/KB/scripting/JavaScript_Tips.aspx (part 1)

http://www.codeproject.com/KB/scripting/JavaScript_Tips_-_Part_2.aspx(part 2)

Advertisement

About this entry