ak1460
04-24-2005, 06:03 AM
Hi
I am somthing of a novice at this and was trying to understand how this script works...essentially when you click on the highlighted text, some other text drops down adjusting the entire view of the page....any help would be greatly appreciated....
here is the code in a HTML page:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script language="JavaScript" type="text/JavaScript">
<!--
function ChangeVisibilityOf(ElementID){
if (document.getElementById){
ElementID = document.getElementById(ElementID);
//alert(ElementID.style.display);
if (ElementID.style.display == 'none' | ElementID.style.display == '') {
ElementID.style.display = 'block';
}
else {
ElementID.style.display = 'none';
}
}
else{
window.alert('Your internet browser doesn\'t support DOM specification, please try to upgrade as soon as you can to a newer version');
}
}
//-->
</script>
</head>
<body>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<td class="blue"><a href="javascript:onClick=ChangeVisibilityOf('1');"><font color="#0000FF">HINDI
DIRECT™</font></a> * <div id=1 style = "display:none;">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><div align="justify"><span class="normal"><br>
HindiDirect features STAR ONE, which broadcasts general entertainment
programs for young, urban audiences. Also included is STAR PLUS,
India's #1 channel for four years, featuring a mix of entertainment
around the clock, and STAR NEWS, India's choice for relevant and
independent news.<br>
<br>
</span></div></td>
</tr>
</table>
<div align="left"></div>
</div></td>
</tr>
</table>
</body>
</html>
I am somthing of a novice at this and was trying to understand how this script works...essentially when you click on the highlighted text, some other text drops down adjusting the entire view of the page....any help would be greatly appreciated....
here is the code in a HTML page:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script language="JavaScript" type="text/JavaScript">
<!--
function ChangeVisibilityOf(ElementID){
if (document.getElementById){
ElementID = document.getElementById(ElementID);
//alert(ElementID.style.display);
if (ElementID.style.display == 'none' | ElementID.style.display == '') {
ElementID.style.display = 'block';
}
else {
ElementID.style.display = 'none';
}
}
else{
window.alert('Your internet browser doesn\'t support DOM specification, please try to upgrade as soon as you can to a newer version');
}
}
//-->
</script>
</head>
<body>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<td class="blue"><a href="javascript:onClick=ChangeVisibilityOf('1');"><font color="#0000FF">HINDI
DIRECT™</font></a> * <div id=1 style = "display:none;">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><div align="justify"><span class="normal"><br>
HindiDirect features STAR ONE, which broadcasts general entertainment
programs for young, urban audiences. Also included is STAR PLUS,
India's #1 channel for four years, featuring a mix of entertainment
around the clock, and STAR NEWS, India's choice for relevant and
independent news.<br>
<br>
</span></div></td>
</tr>
</table>
<div align="left"></div>
</div></td>
</tr>
</table>
</body>
</html>