[Javascript] RES: RES: (no subject)

SosCpdGMail soscpd at gmail.com
Wed Aug 29 22:17:40 CDT 2007


	Sorry gentleman... but the really important in the code is 

    if(ie) object=eval('document.all.'+element+'.style');
    else if(ns) object=eval('document.layers["'+element+'"]'); 
    else if(w3) object=eval('document.getElementById("'+element+'").style');



	How do you figure the browser or his compatibility with standards
and like, I really do not plan to do. We can always start a thread about
this subject, but please, show code or ways to do so? Just arguing is not
enough, and make newbie's ask questions about homework. 

	Is the all wrong? Why? Works! I use IE6/IE7, FF1, 1.5, 2.0, Opera 9
and Safari and for a kick, JavaScript Lint 0.3, for debug and this code run
fine in all listed browsers (read JS interpreters). 




-----Mensagem original-----
De: javascript-bounces at lists.evolt.org
[mailto:javascript-bounces at lists.evolt.org] Em nome de Hassan Schroeder
Enviada em: quarta-feira, 29 de agosto de 2007 21:02
Para: JavaScript List
Assunto: Re: [Javascript] RES: (no subject)

liorean wrote:

> The important factor is usage, not method. You should detect which
> code path to go based on whether the objects for that code path
> exists, not depending on which browser you think the user is using.

Not very realistic, I think. I remember far too many times having a
browser (not necessarily IE!) claim it implemented something only to
find out the implementation didn't *actually* work.

Bad enough to find out now that more browsers than just IE support
document.all :-)

-- 
Hassan Schroeder ----------------------------- hassan at webtuitive.com
Webtuitive Design ===  (+1) 408-938-0567   === http://webtuitive.com

                            dream.  code.

_______________________________________________
Javascript mailing list
Javascript at lists.evolt.org
http://lists.evolt.org/mailman/listinfo/javascript




More information about the Javascript mailing list