W3C home > Mailing lists > Public > www-dom@w3.org > January to March 2000

Calling a DIV tag with Javascript....

From: Irene Meleski <imdesign@mindspring.com>
Date: Fri, 3 Mar 2000 13:36:43 -0800
Message-Id: <a04310106b4e5e0843c3d@[209.237.7.156]>
To: www-dom@w3.org
Would anyone know how to write a function Javascript the calls a div 
tag that shows and hides a layer? I'm doing some research to find out 
how to write the code. Any suggestions? Thanks

<SCRIPT language="JavaScript1.2">

	function ChangeLayer(show, hide_a, hide_b, hide_c)
	{
		var showDiv = document.div_ + show
		var hideDiv_a = document.div_ + hide_a
		var hideDiv_b = document.div_ + hide_b
		var hideDiv_c = document.div_ + hide_c

		document.div_1.style.visibility = "hidden";
		//hideDiv_a.style.visibility="hidden"
		//hideDiv_b.style.visibility="hidden"
		//hideDiv_c.style.visibility="hidden"
		//showDiv.style.visibility="visible"
	}
function showPopUp()
{
	if (document.all) {
		document.myPopup.style.visibility = "visible";
	}
	else if (document.layers) {
		document.ids.myPopup.visibility = "visible";
	}
}

function hidePopUp() {
	if (document.all) {
		document.myPopup.style.visibility = "hidden";
	}
	else if (document.layers) {
		document.ids.myPopup.visibility = "hidden";
	}
}


</SCRIPT>
Received on Friday, 3 March 2000 16:44:42 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 22 June 2012 06:13:47 GMT