Annoying flaw / bug in ASP.NET

G

Guest

I think there is a flaw/bug in ASP.NET or IIS. I try to test my pages
in Firefox Browser because it's better than IE (page source coloring,
tabbed browsing, etc.) but the JavaScript that is generated for ASP.NET
compile errors doesn't work on Firefox (try clicking on the JavaScript
link to view the complete code). I'm using ASP.NET/C# on Windows XP
Pro/IIS. I'm getting JavaScript errors from the ASP.NET generated
JavaScript: "window.event has no properties."

This is what it looks like (I don't know JavaScript) --

<script language="JavaScript">
function OnToggleTOCLevel1()
{
var elemSrc = window.event.srcElement;
var elemLevel2 = document.all(elemSrc.level2ID);

if (elemLevel2.style.display == 'none')
{
elemLevel2.style.display = '';
if (elemSrc.usesGlyph == '1')
elemSrc.innerHTML = '6';
}
else {
elemLevel2.style.display = 'none';
if (elemSrc.usesGlyph == '1')
elemSrc.innerHTML = '4';
}
}
</script>
 
S

Scott Allen

This looks like the source you'd see if there is a compiler error on
the ASPX page.

My suggestion would be to view the page in IE until you can fix the
compiler error. All of the basic ASP.NET controls work pretty well
with FireFox, I think, although I have not done extensive testing in
that area.
 
G

Guest

Scott said:
This looks like the source you'd see if there is a compiler error on
the ASPX page.

My suggestion would be to view the page in IE until you can fix the
compiler error. All of the basic ASP.NET controls work pretty well
with FireFox, I think, although I have not done extensive testing in
that area.

I realize that the solution is to view the page in IE. I'm just
pointing out that there is a bug. One thing that I have noticed is that
ASPX pages often only display correctly in IE and not in Firefox. I
would just write it off to bad programming but it's something that I
find very often and even in books like Beginning ASP.NET 1.1 in C# by
Matthew MacDonald (which I am learning from). I am running the sample
code in Firefox and some of it doesn't display correctly.
 
J

Juan T. Llibre

That is most likely caused by your Browsercaps section
in either machine.config or web.config not having an
appropiate entry for Firefox, .

Go to : http://slingfive.com/pages/code/browserCaps/browserCaps_spaces.txt
and modify your application's web.config or your server's machine.config
per the code at that page and that should allow browsing your websites
with Firefox, Mozilla, Konqueror, Opera and Mac's Safari browser.
 
K

Kevin Spencer

A bug is when an application does not behave as designed. What you are
describing is not a bug. In fact, it is perfectly possible to design ASP.Net
pages that work well in all browsers. But you have to know a bit more about
ASP.Net, as well as browsers, in order to do so.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Ambiguity has a certain quality to it.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,754
Messages
2,569,527
Members
44,998
Latest member
MarissaEub

Latest Threads

Top