f



layer script modification

I'm trying to make an adjustment to allow contentone to be visible when the
page loads but I can't figure it out. Will anyone be so kind and help? I
appreciate any assistance you can provide!

TIA - Rob

<script type="text/javascript">
<!--
function changeDiv(the_div,the_change)
{
 var the_style = getStyleObject(the_div);
 if (the_style != false)
 {
   the_style.display = the_change;
 }
}

function hideAll()
{
 changeDiv("contentone","none");
 changeDiv("contenttwo","none");
}

function getStyleObject(objectId) {
 if (document.getElementById && document.getElementById(objectId)) {
   return document.getElementById(objectId).style;
 } else if (document.all && document.all(objectId)) {
   return document.all(objectId).style;
 } else {
   return false;
 }
}
// -->
</script>

<form>
<input style="border-style:none;" type="radio" name="HardDrive"
onClick="hideAll(); changeDiv('contentone','block');">Content One<br>
<input style="border-style:none;" type="radio" name="HardDrive"
onClick="hideAll(); changeDiv('contenttwo','block');">Content Two<br>
</form>

<div id="contentone" style="display:none">
content one
</div>

<div id="contenttwo" style="display:none">
content two
</div>


0
Rob
6/27/2003 9:27:05 PM
comp.lang.javascript 38370 articles. 2 followers. javascript4 (1315) is leader. Post Follow

0 Replies
540 Views

Similar Articles

[PageSpeed] 21

Reply: