layer script modification

R

Rob

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>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top