|
From: Josep M. i T. <jm...@ne...> - 2000-12-15 01:56:48
|
Hi!
-----Mensaje original-----
De: Brandon Myers <bnd...@ho...>
Para: dyn...@li... <dyn...@li...>
Fecha: viernes 15 de diciembre de 2000 2:27
Asunto: RE: [Dynapi-Dev] Mozilla & Opera
>This was my updated browser.js file.. I've had it for about 2 months now...
>
>notice the line: else if (navigator.userAgent.indexOf("Opera")>0) this.b =
>"opera";
>
>
>function BrowserCheck() {
> var b = navigator.appName;
> if (b=="Netscape") this.b = "ns";
> else if (navigator.userAgent.indexOf("Opera")>0) this.b = "opera";
> else if (b=="Microsoft Internet Explorer") this.b = "ie";
> if (!b) {
> alert('This browser is not supported in this version');
> history.back();
> }
> this.version = navigator.appVersion;
> this.v = parseInt(this.version);
> // Supported Browsers Below:
> this.ns = (this.b=="ns" && this.v>=4);
> this.ns4 = (this.b=="ns" && this.v==4);
> this.ns5 = (this.b=="ns" && this.v==5);
>
> this.ie = (this.b=="ie" && this.v>=4);
> this.ie4 = (this.version.indexOf('MSIE 4')>0);
> this.ie55 = (this.version.indexOf('MSIE 5.5')>0);
> if(this.ie55) this.v=5.5;
> else {
> this.ie5 = (this.version.indexOf('MSIE 5')>0);
> if(this.ie5) this.v=5;
> }
> this.opera=(this.b=="opera");
> if (this.opera) this.v=this.version.split(" ")[0];
> // Detect as close to TRUE DOM as possible... DOM support in this API is
>dependent on the following 2 functions.
> this.dom =
>((document.createRange&&(document.createRange().createContextualFragment))?
t
>rue:false);
> if (this.dom) is.b="dom";
> this.min = (this.ns||this.ie||this.dom);
> var ua = navigator.userAgent.toLowerCase();
> if (ua.indexOf("win")>-1) this.platform = "win32";
> else if (ua.indexOf("mac")>-1) this.platform = "mac";
Please, let me add:
else if (ua.indexOf("OS/2")>-1) this.platform = "OS/2";
else if (ua.indexOf("X11")>-1) this.platform = "UNIX"; // yes I know that
this is not always true! But it is often true!
> else this.platform = "other";
>}
>
Regards!
BTW, the archives of opera-users mailing list can be found
http://web.opera.com/archives/public/opera-users/2000-December/
There are some posts about javascript, one of them is very interesting
because its from a guy which want to change the contents of a span element.
The point is that all the posts says javascript doesn't work, and I think
that opera staff must also be suscribed to that list, don't they? So if they
don't reply this guy to tell him how to do it I must think it can't be done.
To sum up, I think all we can do is create all the widgets before onLoad (as
Dan said) and neither create anything nor change the contents of anything.
Regards,
Josep
|