PDA

View Full Version : Windows Media Player effect... help please


Sephiroth
12-20-2002, 08:19 AM
I've been trying to figure this out for days with no luck.... I hope somebody here can help me.

I've got a site I'm working on based on framesets. There's a top frame for the header, two frames in the middle, one being for the sidebar and the other for the main page content, and an optional one at the bottom through PHP variables, if's, and else's.

I'm trying to figure out a way through either Java or DHTML to make the sidebar frame minimizeable or completely hidden on the click of a link or image, ala the way that in Windows Media Player you can click on the button to minimize and maximize the Now Playing, Media Guide, etc. bar.

Any ideas of how I could do this? I don't know the least about coding Java or DHTML.

glenngv
12-20-2002, 08:44 AM
try this:

frameset page:

<html>
<frameset id="fs" border="0" frameborder="0" framespacing="0" cols="10%,90%">
<frame name="frame1" src="page1.htm">
<frame name="frame2" src="page2.htm">
</frameset>
</html>

page2.htm where you want to have the button to remove/display frame1:

<input type=button value="Minimize Frame" onclick="top.document.getElementById('fs').cols='0%,100%';">
<input type=button value="Display Frame" onclick="top.document.getElementById('fs').cols='10%,90%';">

Sephiroth
12-20-2002, 03:15 PM
thanks dude, that works :)

Sephiroth
12-20-2002, 05:11 PM
hmm, is there any way to make this work with text links?

Mr J
12-20-2002, 08:45 PM
<a href="yourpage.html" onclick="top.document.getElementById('fs').cols='0%,100%';"> LINK </a>