Florian said:
i'm currently working for a big project to construct a website.
We need to support some browser and OS :
For a web site supporting browsers would be a good idea
IE 5.0 -> IE 6, Mozilla 1.2 -> 1.7,
Opera 5 -> Opéra 7.5x,
I very much doubt that anyone is still using Opera 5 (and certainly
versions less than 5.12). Opera 5 -> Opera 7.5x will include the
extremely limited and buggy Opera 5.02. You will have your work cut out
getting much out of that one.
Netscape 4.75 -> NS 7.2, Safari
Netscape 6 versions were based on pre-release (0.9) versions of Mozilla.
They were unreliable and cranky and I would hope that everyone who
upgraded from Netscape 4 to 6 also moved on to the infinitely better
Netscape 7 versions when they became available.
Given that this list sets a minimum Mozilla version of 1.2 (and doesn't
mention Firefox at all) it doesn't seem like its creator knew much about
actual web browsers.
and for OS : Win95/98/NT/Me/2000/XP, MacOS 9/10, Linux.
Presumably this list of browsers features in some sort of specification
for the web site. Does the specification explicitly state javascript
enabled default configurations of the listed browsers or are you
expected to cope with all of there configuration permutations by
implication (including the option of turning javascript off)?
I have some problems with browser on different OS. For
example i have write a javascript who make a automatic
submit when the page is reload.
<script language="Javascript" for="window" event="onload()">
Martin has already explained why that SCRIPT tag is not going to be
useful.
if( navigator.userAgent.indexOf("Opera") != -1 ){
Don't do this. The - navigator.userAgent - string has no relationship
with the type or version of the browser (except by coincidence in a
limited number of cases):-
setTimeout("document.forms[0].elements['btValider'].click();",
1000);
} else{
document.forms[0].submit();
}
</script>
The automated submitting of forms can be disabled by configuration in
some of your listed browsers, and is also one of the things that can be
barred by content inserting/re-writing proxies (personal firewalls,
Internet security programmes, some types of advertising blockers, etc.).
However, submitting a form implies some sort of server-side scripting in
order to be useful. And automatically submitting a form as the page
loads implies that the form data is not going to be filled in by the
user but is pre-filled in (probably by a server-side script). Making
this no more than a mechanism for passing data around. As such it is
almost certainly the wrong way of doing this. There are many alternative
methods, but without knowing why you are attempting this in the first
palace (and the full context) it is impossible to suggest any one.
This work fine on XP with Mozilla 1.6 but when i try
Mozilla 1.6 on Win98 or NT , i have no refresh and i
need to click to the submit button to send the form....
I'm searching the dependencies between Javascript and
OS( or Browser in different OS ). Someone can help me ??
All infos is accepted
Javascript was standardised by the ECMA and all of browsers you list
implement, at minimum, a fairly consistent version of ECMA 262 2nd
edition (most implementing the 3rd edition).
On the other hand, the DOMs of the browsers listed vary enormously. You
have the very un-dynamic Opera <= 6, with minimal scriptable style
support and an incomplete W3C level 1 DOM. You have the monstrosity that
was Netscape 4, with its totally different approach to dynamic content
and extremely limited DOM. And then you have the latest all singing and
dancing Mozilla versions.
Unfortunate, on the evidence of what you have posted here as code and as
a question, I suspect that you are completely out of your depth. And are
probably 6 months of intensive research, experimentation and
cross-browser scripting, away from being able to cope with this project
well. In the meanwhile trying to learn 'on the job' will leave you
thrashing about (mostly ineffectually) putting code that is objectively
bad into a production web site at someone else's expense.
Assuming that you don't have the option of hiring someone who already
has the skills needed for the job, and that you actually care to be
doing the best job you are capable of doing for your client, you are
going to need a lot of help. You will be able to get some of that help
from comp.lang.javascript as the group has a distinct bias towards
cross-browser scripting, but you are going to have to optimise you
interactions with the group and put a lot of work in yourself. First
locate, read and familiarise yourself with the group's FAQ:-
<URL:
http://jibbering.com/faq/ >
- paying particular attention to the advice on efficiently asking
questions that is linked to from section 2.3, and becoming familiar with
what is available at the various resources listed.
Richard.