Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DYNAMIC CONTENT IN LAYERS

Status
Not open for further replies.

subtvshow

Technical User
Jul 14, 2002
21
US
I am trying to get a layer to display different content
everytime a different text link (part of a pop up menu)
is pressed. Where do I even begin? Do I need to use ASPs
for this?
 
It can be done from popups like this, without asp:

First, name the layer:
-------
<div id=&quot;thediv&quot;></div>
-------
Then, every time a link is clicked tell it to do a function to replace the innerHTML of thediv:
-------
<a href=&quot;javascript:replace1();&quot;>Replace the first text</a>
<a href=&quot;javascript:replace2();&quot;>Replace the second text</a>
<script>
<!--
function replace1(){
thediv.innerHTML='<b>I'm the text from replace1!!!</b>';
}
function replace2(){
thediv.innerHTML='<b>I'm the text from replace2!!!</b>';
}
//-->
</script>
-------

Rick It's a pleasure to know that I've helped you. If I have,
please click the link below to let me know. :)
 
Thank you for your reply, now how do I make it so that I can basically put a whole page of info, including images which would also act as buttons inside that div everytime a new link is pressed? Do I need asps for that?
or would CSS solve my problem?
 
2 ways:

1. Use SSI--
<!--#include file=&quot;page.htm&quot; -->

2. For IE 4+ and NS 6.0+, put an iframe in the div, like this--
<iframe src=&quot;page.html&quot;></iframe>

If you can use SSI, it's much better, as it will work everywhere.

Rick It's a pleasure to know that I've helped you. If I have,
please click the link below to let me know. :)
 
Thanks for your speedy reply!
Now, how do I tell the pop up menu buttons to load
different ssi pages when clicked?

I used an iframe, but I can't send a function variable from
it to the parent window where it needs to be processed
by the MediaPlayer element.

This is what my pop up button looks like:
linkset[0]='<div class=&quot;menuitems&quot;><a href=&quot; target=&quot;ifram&quot;>Catering Halls</a></div>'

could I put the ssi in a layer, or table without the iframe?
if so, how? the ssi will also contain the say function,
when called, will it work since the mediaplayer
is embeded in the parent page also with the ssi?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top