W3C home > Mailing lists > Public > www-html@w3.org > September 2002

Re: Query Reg accessing Div->Style->Width in XHTML using Javascript

From: Toby Inkster <tobyink@goddamn.co.uk>
Date: Tue, 24 Sep 2002 08:14:41 +0100
To: www-html@w3.org
Message-Id: <20020924081441.0167b101.tobyink@goddamn.co.uk>

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

On Tue, 24 Sep 2002 11:56:15 +0530
Amit Mahajan <amahajan@quark.co.in> wrote:

| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 Strict//EN" 
| "http://www.w3.org/TR/xhtml11/DTD/strict.dtd">
| <html xmlns="http://www.w3.org/1999/xhtml">
| <script language = "Javascript">
| 	function callJS() {
| 		var obj = document.getElementById("menuItem").style.width;
| 		alert("obj.style.width" + obj);
| 	}
| </script>
| <HEAD>
| <META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
| </HEAD>
| <BODY>
| <div ID="menuItem" Style="position:'absolute'; left:'10'; right:'100';
| width:'200'; height:'400';" onmouseover="callJS();">Lets see if it works
| </div>
| </BODY>
| </html>

JavaScript isn't my speciality, but here's one problem straight away -- in XHTML 1.1 (and all other versions of XHTML), tags are CaSE-sENsitIVe. There are no such tags as <HEAD>...</HEAD>. You must use <head>...</head> instead. 

- -- 
Toby A Inkster BSc ARCS
PGP:      http://www.goddamn.co.uk/tobyink/node.cgi?id=12
Web Page: http://www.goddamn.co.uk/tobyink/
IM:       AIM:inka80 ICQ:6622880 YIM:tobyink Jabber:tobyink@a-message.de

Yow!  Is this sexual intercourse yet??  Is it, huh, is it??
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE9kBDhzr+BKGoqfTkRAh+YAJwOk2xYvCOycjQe3G0FocKbbBPRnACcCKpr
hdGDbWSYZl0qPap0RTvLCi8=
=6B2B
-----END PGP SIGNATURE-----
Received on Tuesday, 24 September 2002 13:09:20 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 27 March 2012 18:15:52 GMT