PDA

View Full Version : Resolved Collapsible Chatroom



Tye
01-25-2009, 06:23 AM
Here is my website: AnimeUnloaded.com (http://www.animeunloaded.com)

I want the chat to be able to collapse. Here is my Java Script Code:


function config(){
document.getElementById("hide").onclick = hidechat;
document.getElementById("show").onclick = showchat;
}

function hidechat(){
document.getElementById("chatdiv").className = "invisible";
}
function showchat(){
document.getElementById("chatdiv").className = "visible";
}

And Here is my sidebar.php code...


<script language="javascript" src="wp-content/themes/decoder.0.9.1/decoder/java/showhide.js"></script>
<div id="content-right">

<style type="text/css">
<!--
.visible {
display: block;
}
.invisible {
display: none;
}
.showhide {
display: inline;
color: #eee;
cursor: pointer;
}
.showhide:hover {
color: #6598b8;
text-decoration: underline;
cursor: pointer;
}
-->
</style>

<?php if ( !function_exists('dynamic_sidebar')
|| !dynamic_sidebar() ) : ?>


<div class="box-right">

<h4 class="sidebar-title">News:</h4>
<ul><a href= "http://animeunloaded.com/?p=1252">Naruto Shippuden 93 (High Quality)</a> Uploaded!</ul>
<ul><a href= "http://animeunloaded.com/?page_id=1219">Bleach 203</a> Uploaded!</ul>
<hr>
<small><strong><center><a href= "http://animeunloaded.com/forum/index.php?board=4.0">Report Broken Episodes Here</a></center></strong></small>

</div>

<div class="box-right">
<h4 class="sidebar-title">Chat</h4>
[<span class="showhide" id="hide" onclick=hidechat()>Hide chat</span>] | [<span class="showhide" id="show" onclick=showchat()>Show chat</span>]
<hr>
<object width="250" height="500" id="obj_1232501480399"><param name="movie" value="http://animeunloaded.chatango.com/group"/><param name="wmode" value="transparent"/><param name="AllowScriptAccess" VALUE="always"/><param name="AllowNetworking" VALUE="all"/><param name="AllowFullScreen" VALUE="true"/><param name="flashvars" value="cid=1232501480399&a=1F1F1F&b=95&c=FFFFFF&d=FFFFFF&e=1F1F1F&f=50&g=FFFFFF&h=1F1F1F&j=FFFFFF&l=999999&m=1F1F1F&n=FFFFFF&q=1F1F1F&r=100&s=1&w=0"/><embed id="emb_1232501480399" src="http://animeunloaded.chatango.com/group" width="250" height="500" wmode="transparent" allowScriptAccess="always" allowNetworking="all" type="application/x-shockwave-flash" allowFullScreen="true" flashvars="cid=1232501480399&a=1F1F1F&b=95&c=FFFFFF&d=FFFFFF&e=1F1F1F&f=50&g=FFFFFF&h=1F1F1F&j=FFFFFF&l=999999&m=1F1F1F&n=FFFFFF&q=1F1F1F&r=100&s=1&w=0"></embed>
</div>

<div class="box-right">
<script type="text/javascript"><!--
google_ad_client = "pub-3289959596797445";
/* 250x250 - Square under chat, created 1/18/09 */
google_ad_slot = "2335122775";
google_ad_width = 250;
google_ad_height = 250;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div>

<div class="box-right">

<h4 class="sidebar-title">Affiliates</h4>
<hr>
<center><small>
<ul><a href= "http://www.narutospot.net">NarutoSpot</a></ul>
<br>
<a href="http://www.animetoplist.org/">Anime Toplist</a>
</center></small>
<br>
<br>
<center><small>Contact me to become an affiliate!</small></center>


</div>

<?php endif; // endif widgets ?>

</div><!-- end content-right -->

Nile
01-25-2009, 03:34 PM
http://localhostr.com/files/c5a155/capture.png
There's no div with the ID of chatdiv, well, a div that I can find.

Tye
01-25-2009, 05:19 PM
Thank you Nile, I appreciate all the help you give me. You truly are a valuable asset to the Dynamic Drive forums. :)