[thelist] Opera And Javascript

Cake cake at brothercake.com
Mon Jan 13 04:48:01 CST 2003


Opera 5 and 6 don't support dynamic display - you can set an initial display
property with CSS, but you can't change it afterwards.  No probs in O7
though


J
----- Original Message -----
From: "Martyn Haigh" <martyn.haigh at virgincosmetics.com>
To: <thelist at lists.evolt.org>
Sent: Monday, January 13, 2003 9:52 AM
Subject: [thelist] Opera And Javascript


> Hi,
>
> I'm having some problems with javascript and opera - this works in IE6 &
> Mozilla PC(not tested on Mac).
>
> I have a simple API :
>
> function getObj(name)
> {
>   if (document.getElementById)
>   {
>   this.obj = document.getElementById(name);
> this.style = document.getElementById(name).style;
>   }
>   else if (document.all)
>   {
> this.obj = document.all[name];
> this.style = document.all[name].style;
>   }
>   else if (document.layers)
>   {
>    this.obj = document.layers[name];
>    this.style = document.layers[name];
>   }
> }
>
> Some JS :
>
> x = new getObj('ClassText');
> x.style.display = 'none';
> x = new getObj('ClassInp');
> x.style.display = 'none';
>
> Some HTML (cut down version):
>
> <input id="ConsInp" type="text" />
> <span id="ConsText">Please state name:&nbsp;</span>
>
> when I put the JS code into an init() command which is activated onload
> (onload="init(); ") it works in IE6 & Mozilla but it doesn't work in
Opera -
> does anyone know why?
>
> I'm not very good at Javascript - and have no idea what the Mozilla DOM
> looks like.
>
> Can anyone help?  I'll wash your car for you!!!
>
> Thank you!!
>
> M
>
>
> DISCLAIMER: The information in this email is confidential and may be
legally
> privileged. It is intended solely for the addressee. Access to this email
by
> anyone else is unauthorised. If you are not the intended recipient, any
> disclosure, copying, distribution or any action taken or omitted to be
taken
> in reliance on it, is prohibited and may be unlawful.
>
>
> --
> * * Please support the community that supports you.  * *
> http://evolt.org/help_support_evolt/
>
> For unsubscribe and other options, including the Tip Harvester
> and archives of thelist go to: http://lists.evolt.org
> Workers of the Web, evolt !
>
>




More information about the thelist mailing list