Vinny,
Thanks for the response. Can you point me to an example where I can see what you're talking about in action?
thanks,
devin
Main Topics
Browse All TopicsHello,
I am downloading a few rss feeds using some php functions. As the feeds are
downloaded they are parsed into dynamically assigned layer id's. Once all
the feeds are downloaded and parsed. The first feed is displayed on screen
with links to display the other feeds when clicked upon. Clicking on a feed
link hides the current layer id and shows the layer id of the link clicked.
Pretty straight forward stuff I would imagine.
At any rate the problem I am experiencing is that the first layer id is
being positioned correctly but the subsequent layers are being positioned as
if they were below the first layer. I am explicitly placing all layers
at a 0,0 position relative to the container layer yet it still doesn't work.
To see what I am talking about click on this link
http://rise4peace.com/devi
Register, or Macromedia Dreamweaver links on the left hand menu.
The only reason I can see why this would not work is because the css has
already been loaded by the browser before all the layer id's have been
created. Even if this was the case I would think that when I assign the
layer location within the container it would still work.
Any suggestions would be greatly appreciated.
cheers,
devin
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Hi devin:
I'll make it easier for you:
<html>
<head>
<script type="text/javascript" language="javascript">
function swapContent(divID, srcDivID)
{
document.getElementById(di
}
</script>
<style type="text/css">
</style>
</head>
<body>
<a href="#" onclick="swapContent('theD
<a href="#" onclick="swapContent('theD
<a href="#" onclick="swapContent('theD
<div id='theDiv'>default content</div>
<div id='lyr1' 'display:none'>layer 1 content</div>
<div id='lyr2' 'display:none'>layer 2 content</div>
<div id='lyr3' 'display:none'>layer 3 content</div>
content outside of the divs
</body>
</html>
With the above you don't have to change the way you get your source, simply:
1) add the function
2) change the menus so they reflect the above
3) change your current divs to stay hidden.
What I meant before essentially would involve placing your feeds into arrays or divs (as above) until they were needed. then the replacement would be approx the same.
Vinny
document.getElementById is version 5+ compatible.
if you need IE4:
function swapContent(divID, srcDivID)
{
var divObj1 = (document.getElementById) ? document.getElementById(di
var divObj2 = (document.getElementById) ? document.getElementById(sr
divObj1.innerHTML = divObj2.innerHTML;
}
notes:
1) no code for NN4 -- it would involve too much (absolute positioning; additional code) and unless you really absolutely need it...don't bother
2) the first line assigns to ver5+ browsers first, then IE4 -- (IE5+ recognizes doc..all, but so what :)
3) I threw out the second test in the second line because I know only ver5+ & IE4 are left
Vinny
Vinny,
I made the proper changes to my code and it's working really well.
The only other question I have is why would the scrollbars show when there's no content to be displayed?
http://www.rise4peace.com/
I checked through the source code and I can't see any place where this should happen. Is this something dhtml has a hard time handling?
many thanks,
devin
Business Accounts
Answer for Membership
by: VincentPugliaPosted on 2004-07-13 at 12:20:11ID: 11542287
Hi,
The easiest fix would be:
1) have one layer
2) replace the one layer's innerHTML instead of having 3 layers and swapping their visibility.
Vinny