Phlex
01-23-2006, 03:18 PM
Hi !
I used this option http://www.vbadvanced.com/membersarea.php?do=viewusermanual&productid=4&pageid=6 to creat a sidebar .
And now i would like to give my users the option to expand and fold the sidebar like here -> http://www.webdevforum.de/forum/index.php
The js is afaik:
<script type="text/javascript">
<!--
function my_toggle_sidebar()
{
obj = fetch_object('left_sidebar');
obj2 = fetch_object('fold_left_sidebar');
if (!obj)
{
return false;
}
if (obj.style.display == 'none')
{
obj.style.display = '';
save_collapsed('left_sidebar', false);
obj2.className = 'sidebar_is';
}
else
{
obj.style.display = 'none';
save_collapsed('left_sidebar', true);
obj2.className = 'sidebar_is_collapsed';
}
return false;
}
function my_hover_sidebar()
{
obj = fetch_object('fold_left_sidebar');
if (!obj)
{
return false;
}
if (obj.className == 'sidebar_is_collapsed')
{
obj.className = 'sidebar_is_hover_collapsed';
}
else if (obj.className == 'sidebar_is')
{
obj.className = 'sidebar_is_hover';
}
return false;
}
function my_out_sidebar()
{
obj = fetch_object('fold_left_sidebar');
if (!obj)
{
return false;
}
if (obj.className == 'sidebar_is_hover')
{
obj.className = 'sidebar_is';
}
else if (obj.className == 'sidebar_is_hover_collapsed')
{
obj.className = 'sidebar_is_collapsed';
}
return false;
}
// -->
</script>
THX Guys !
//excuse my bad english :D
I used this option http://www.vbadvanced.com/membersarea.php?do=viewusermanual&productid=4&pageid=6 to creat a sidebar .
And now i would like to give my users the option to expand and fold the sidebar like here -> http://www.webdevforum.de/forum/index.php
The js is afaik:
<script type="text/javascript">
<!--
function my_toggle_sidebar()
{
obj = fetch_object('left_sidebar');
obj2 = fetch_object('fold_left_sidebar');
if (!obj)
{
return false;
}
if (obj.style.display == 'none')
{
obj.style.display = '';
save_collapsed('left_sidebar', false);
obj2.className = 'sidebar_is';
}
else
{
obj.style.display = 'none';
save_collapsed('left_sidebar', true);
obj2.className = 'sidebar_is_collapsed';
}
return false;
}
function my_hover_sidebar()
{
obj = fetch_object('fold_left_sidebar');
if (!obj)
{
return false;
}
if (obj.className == 'sidebar_is_collapsed')
{
obj.className = 'sidebar_is_hover_collapsed';
}
else if (obj.className == 'sidebar_is')
{
obj.className = 'sidebar_is_hover';
}
return false;
}
function my_out_sidebar()
{
obj = fetch_object('fold_left_sidebar');
if (!obj)
{
return false;
}
if (obj.className == 'sidebar_is_hover')
{
obj.className = 'sidebar_is';
}
else if (obj.className == 'sidebar_is_hover_collapsed')
{
obj.className = 'sidebar_is_collapsed';
}
return false;
}
// -->
</script>
THX Guys !
//excuse my bad english :D