HighDots Forums  

layer script modification

Javascript JavaScript language (comp.lang.javascript)


Discuss layer script modification in the Javascript forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Rob
 
Posts: n/a

Default layer script modification - 06-27-2003 , 05:27 PM






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>



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.