/    Sign up×
Community /Pin to ProfileBookmark

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

okham

to post a comment
HTML

5 Comments(s)

Copy linkTweet thisAlerts:
@pyroNov 04.2003 — [i]Originally posted by okham [/i]

[B]I read on a website that current browsers ignore the <div> tag, and I was wondering what the alternative was...[/B][/QUOTE]
Delete that from your memory, and never visit the site again. <div>'s [i]are[/i] the alternative. Other than that, people use <table>s for layout.
Copy linkTweet thisAlerts:
@okhamauthorNov 04.2003 — ...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:

Code

___________________
<div id="polyester" style="LEFT:5px; position:absolute; TOP:5px; visibility:hidden; z-index:1">

<form method="post" action="">

<select name="poly2">

<option name="100" selected>Fabric 100

<option name="200">Fabric 200

</select>

</form>

</div>


<form method="post" action="">

<select name="fabtype" onchange="display();">

<option name="poly1" selected>Polyester

<option name="cott1">Cotton

</select>

</form>



<script language="javascript">

function display() {

document.all[polyester].style.visibility="visible";

}

___________________
Copy linkTweet thisAlerts:
@pyroNov 05.2003 — document.all is IE proprietry code. Try the DOM way:

&lt;script language="javascript"&gt;
function display() {
document.getElementById("polyester").style.visibility="visible";
}
&lt;/script&gt;
Copy linkTweet thisAlerts:
@okhamauthorNov 05.2003 — ...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.

The javascript forum doesn't seem to be as well traveled...I asked the same question there, but haven't got a reply. - -

okham
Copy linkTweet thisAlerts:
@pyroNov 05.2003 — 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. ?
×

Success!

Help @okham spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.27,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...