Firefox and IE browser

G

Guest

Hello Guys,

I am posting my weird experience on firefox by a piece of code I have
written. That piece of code is supposed to be executed when the page is not
posted back i.e., for the very first time.

In IE, my code is doing what it is supposed to do i.e.., it is not executing
that piece of code whenever page is posted back but in firefox browser it is
executing even if it is a postback.

Any ideas?

Thanks!
 
G

Guest

Are you treating firefox as a downlevel browser? (This is the default
behavior)

If you are, try adding something like this to the <system.web> section;

<browserCaps>
<!-- GECKO Based Browsers (Netscape 6+, Mozilla/Firebird, ...) //-->
<case match="^Mozilla/5\.0 \([^)]*\) (Gecko/[-\d]+)?
(?'type'[^/\d]*)([\d]*)/(?'version'(?'major'\d+)(?'minor'\.\d+)(?'letters'\w*)).*">
browser=Gecko
type=${type}
frames=true
tables=true
cookies=true
javascript=true
javaapplets=true
ecmascriptversion=1.5
w3cdomversion=1.0
css1=true
css2=true
xml=true
tagwriter=System.Web.UI.HtmlTextWriter
<case match="rv:(?'version'(?'major'\d+)(?'minor'\.\d+)(?'letters'\w*))">
version=${version}
majorversion=${major}
minorversion=${minor}
<case match="^b" with="${letters}">
beta=true
</case>
</case>
</case>
</browserCaps>
 
G

Guest

Hello Brad,

I tried adding this section but to no avail. Any ideas?

Could you explain me why downlevel browser concept is related to my problem
of post back?

Thanks for your help!

Brad Quinn said:
Are you treating firefox as a downlevel browser? (This is the default
behavior)

If you are, try adding something like this to the <system.web> section;

<browserCaps>
<!-- GECKO Based Browsers (Netscape 6+, Mozilla/Firebird, ...) //-->
<case match="^Mozilla/5\.0 \([^)]*\) (Gecko/[-\d]+)?
(?'type'[^/\d]*)([\d]*)/(?'version'(?'major'\d+)(?'minor'\.\d+)(?'letters'\w*)).*">
browser=Gecko
type=${type}
frames=true
tables=true
cookies=true
javascript=true
javaapplets=true
ecmascriptversion=1.5
w3cdomversion=1.0
css1=true
css2=true
xml=true
tagwriter=System.Web.UI.HtmlTextWriter
<case match="rv:(?'version'(?'major'\d+)(?'minor'\.\d+)(?'letters'\w*))">
version=${version}
majorversion=${major}
minorversion=${minor}
<case match="^b" with="${letters}">
beta=true
</case>
</case>
</case>
</browserCaps>


Diffident said:
Hello Guys,

I am posting my weird experience on firefox by a piece of code I have
written. That piece of code is supposed to be executed when the page is not
posted back i.e., for the very first time.

In IE, my code is doing what it is supposed to do i.e.., it is not executing
that piece of code whenever page is posted back but in firefox browser it is
executing even if it is a postback.

Any ideas?

Thanks!
 
G

Guest

A downlevel browser is assumed to have lesser capabilities than say IE 5.5
(I'm not acually sure what versions of IE are considered downlevel, but 5.5.
certainly is not)

Downlevel browsers use a different "renderer" (don't remember the name of
the class) that generates HTML 3.2 (or something like that) output.

This means that an asp:panel, that normally renders as a div, renders as a
one celled table. This is just one of many examples.

Diffident said:
Hello Brad,

I tried adding this section but to no avail. Any ideas?

Could you explain me why downlevel browser concept is related to my problem
of post back?

Thanks for your help!

Brad Quinn said:
Are you treating firefox as a downlevel browser? (This is the default
behavior)

If you are, try adding something like this to the <system.web> section;

<browserCaps>
<!-- GECKO Based Browsers (Netscape 6+, Mozilla/Firebird, ...) //-->
<case match="^Mozilla/5\.0 \([^)]*\) (Gecko/[-\d]+)?
(?'type'[^/\d]*)([\d]*)/(?'version'(?'major'\d+)(?'minor'\.\d+)(?'letters'\w*)).*">
browser=Gecko
type=${type}
frames=true
tables=true
cookies=true
javascript=true
javaapplets=true
ecmascriptversion=1.5
w3cdomversion=1.0
css1=true
css2=true
xml=true
tagwriter=System.Web.UI.HtmlTextWriter
<case match="rv:(?'version'(?'major'\d+)(?'minor'\.\d+)(?'letters'\w*))">
version=${version}
majorversion=${major}
minorversion=${minor}
<case match="^b" with="${letters}">
beta=true
</case>
</case>
</case>
</browserCaps>


Diffident said:
Hello Guys,

I am posting my weird experience on firefox by a piece of code I have
written. That piece of code is supposed to be executed when the page is not
posted back i.e., for the very first time.

In IE, my code is doing what it is supposed to do i.e.., it is not executing
that piece of code whenever page is posted back but in firefox browser it is
executing even if it is a postback.

Any ideas?

Thanks!
 
P

Peter Blum

Client-side validation is only supported on DHTML browsers (IE and IE/Mac).
All other browsers only work with server side validation. (Also any IE
browser with JavaScript disabled requires server side validation).
Therefore, you should always write your post back event methods, like the
Click event method, to test for Page.IsValid is true before continuing. The
Button, LinkButton, and ImageButton controls automatically call
Page.Validate() for you. Any other post back code that should only continue
after validation must call Page.Validate() manually before testing
Page.IsValid.

FYI: My replacement to the ASP.NET Validators, Professional Validation And
More (http://www.peterblum.com/vam/home.aspx), supports client-side
validation on FireFox, Mozilla, Opera 7 and many more browsers. It addresses
the numerous limitations of the original validators so you don't have to
write lots of custom code and hacks to get the validation you want.

--- Peter Blum
www.PeterBlum.com
Email: (e-mail address removed)
Creator of "Professional Validation And More" at
http://www.peterblum.com/vam/home.aspx
 

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,778
Messages
2,569,605
Members
45,238
Latest member
Top CryptoPodcasts

Latest Threads

Top