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

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

From: Amit Mahajan <amahajan@quark.co.in>
Date: Tue, 24 Sep 2002 11:56:15 +0530
Message-ID: <7D5800A5B6E26644B2EB7A862856B0D402E6B53D@SARASWATI>
To: www-html@w3.org

Hi,

I am trying the following but its not working on NN6.x don't know why could
anybody comment
<!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>
Received on Tuesday, 24 September 2002 02:31:41 GMT

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