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>
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>