layers

...I've been avoiding layers on a page design that I'm up to, but now I think I've got one simple need for using layers, and I should start to learn about it. I asked this question in "javascript," but it may belong in html as well. I read on a website that current browsers ignore the <div> tag, and I was wondering what the alternative was...<br />
<br />
okham<!--content-->Originally posted by okham <br />
I read on a website that current browsers ignore the <div> tag, and I was wondering what the alternative was...Delete that from your memory, and never visit the site again. <div>'s are the alternative. Other than that, people use <table>s for layout.<!--content-->...actually that's good news, pyro. <Div> seemed like an orderly way to start layers, to me. Welp, maybe you could walk me through something simple, eh? Essentially, I set up a layer, used an onChange handler in a form option, and then tried to display the layer from the script function. - - Didn't work... can you give me some advice, here it is:<br />
<br />
Code<br />
___________________<br />
<div id="polyester" style="LEFT:5px; position:absolute; TOP:5px; visibility:hidden; z-index:1"><br />
<form method="post" action=""><br />
<select name="poly2"><br />
<option name="100" selected>Fabric 100<br />
<option name="200">Fabric 200<br />
</select><br />
</form><br />
</div><br />
<br />
<br />
<form method="post" action=""><br />
<select name="fabtype" onchange="display();"><br />
<option name="poly1" selected>Polyester<br />
<option name="cott1">Cotton<br />
</select><br />
</form><br />
<br />
<br />
<br />
<script language="javascript"><br />
function display() {<br />
document.all[polyester].style.visibility="visible";<br />
}<br />
___________________<!--content-->document.all is IE proprietry code. Try the DOM way:<br />
<br />
<script language="javascript"><br />
function display() {<br />
document.getElementById("polyester").style.visibility="visible";<br />
} <br />
</script><!--content-->...pyro! You're a charm! - - I want you to know I went to the bookstore and just paid 30.00 for a javascript book (well, I need it anyways to learn from), and came home to find your reply that was just what I needed... go figure. Welp, it's all about information exchange. I really wanted to stay uncomplicated about my web project, but I really needed to delve a little bit into the layers thing.<br />
<br />
The javascript forum doesn't seem to be as well traveled...I asked the same question there, but haven't got a reply. - -<br />
<br />
okham<!--content-->Acutally, the JavaScript forums is probably our busiest section. Perhaps your post just got lost in the bunch... Anyway, glad we got it sorted for you. :)<!--content-->
 
Back
Top