Welcome to WebHeadStart.org

Web Technologies

Sponsored By

WebHeadStart.org is currently in beta.
Please pardon our appearance as we work to provide you with the most comprehensive reference on today's web technologies.

Interested in advertising on WebHeadStart? Become an advertising partner today!

[WWW-HTML Mailing List Archive Home] [Messages By Thread] [Messages By Date]

Re: Does this work?

From: Christian Wolfgang Hujer <Christian.Hujer@itcqis.com>
Date: Wed, 10 Dec 2003 09:15:15 +0100
To: "Jitender Kumar C" <Jitender.Chakka@igate.com>, <www-html@w3.org>
Message-Id: <200312100915.17539.Christian.Hujer@itcqis.com>

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

Am Mittwoch, 10. Dezember 2003 05:26 schrieb Jitender Kumar C:
> Hi I have a code as below
> <td height=40 id="demo" width=80
> onmouseover="demo.background='normal-down.gif'">hai jeetu</td>
>
> This is working fine with IE 5 and above.
> I want the same behaviour to be available for Netscape also.  I tried in
> Netscape 6.2 and failed.  Cant we change the background dynamically in
> Netscape...is this a constraint...What might be the problem? if we cant,
> can anybody help me out...I want the same behaviour... Please help me out..
though this is not a "how do I xyz with (X)HTML/CSS/EcmaScript?" list, I 
answer. This list is about discussing the future of (X)HTML.

Afaik, it's undefined wether the current element id automatically becomes 
event handler context. So you would have to use the getElementsById('demo') 
to get this working with Mozilla.

Also, what you do can be achieved without Event Handling / EcmaScript / DOM by 
simple means of CSS:
<!-- ... -->
<style type="text/css">
*#demo:hover {
    background:url(normal-down.gif);
}
</style>
<!-- ... -->
<td height="40" width="80" id="demo">hai jeetu</td>
<!-- ... -->

Usually it's best to do with the simplest possible solution. The CSS solution 
will also work if the user has disabled EcmaScript.

Bye

P.S.:
EcmaScript is aka JavaScript
- -- 
ITCQIS GmbH
Christian Wolfgang Hujer
Geschäftsführender Gesellschafter (Shareholding CEO)
E-Mail: Christian.Hujer@itcqis.com
WWW: http://www.itcqis.com/ 
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2-rc1-SuSE (GNU/Linux)

iD8DBQE/1tYUzu6h7O/MKZkRAne5AKCvDHhXSMI4FdoWoUgkbdfGEzW9hQCgwr6l
2Nx3/eWbBZIgYBycCco56Ww=
=uq30
-----END PGP SIGNATURE-----
Received on Wednesday, 10 December 2003 03:19:48 GMT
Valid XHTML 1.0! Valid CSS! Site Map | Privacy Policy | Terms of Use | WebHeadStart.org © 2005 All Rights Reserved.