Webmastersite.net
Register Log In

How to maximize a hidden box?

Comments on How to maximize a hidden box?

Daniel
Member

Usergroup: Member
Joined: Jul 08, 2009

Total Topics: 17
Total Comments: 31
Daniel
Posted Apr 25, 2010 - 3:45 PM:

There is a javascript function to minimize a box with a click. For example if you click on the "Editorial Controls" this minimize the following box:
_______________________________________________

Moderator Control Panel / Bulk edit/move/delete listings / Show/undelete deleted listings / Edit Category
_______________________________________________

Instead of minimize a box and hide its content I want to maximize a hidden box and its content.

How can I do this?

Not registered Guests also should can do this. (On my page I want to hide an "add-tags-box" and a "feed-box" on the link page).

This is the code in "displaylinks.tpl

<div class="boxtitle" onclick="minmax('modbox')"><div class="boxtitle" onclick="minmax('modbox')"><img src="{IMAGESURL}/icon_mod.png" > Editorial Controls</div></div>

This is the code in the javascriptheader :

function minmax(divid) { if (document.getElementById(divid).style.display == "block") document.getElementById(divid).style.display = "none"; else document.getElementById(divid).style.display = "block"; }

I tried several hours to solve this problem, but didn`t found the solution.

This have no effect:

function minmax(divid) { if (document.getElementById(divid).style.display == "block") document.getElementById(divid).style.display = "block"; else document.getElementById(divid).style.display = "none"; }


Please help me...
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7867
Paul
Posted Apr 26, 2010 - 4:48 AM:

If you click on "editorial controls" a second time, it restores. I'm assuming restore is what you want, not the box taking up the entire page? So it's all the same function and already in the template. If you do mean take up the whole page, that doesn't seem practical since it changes the whole layout. You'd have to make a link to a new page with a custom template where only that box is in it.
Daniel
Member

Usergroup: Member
Joined: Jul 08, 2009

Total Topics: 17
Total Comments: 31
Daniel
Posted Apr 28, 2010 - 2:48 PM:

Glad for your answer, but I still do not know how to do it.

You are right:
I want to "restore" a little box (and not a box taking up the entire page).
But the box should be hidden when you first call the page.
It is just the situation after you have click on "editorial controls":
The box is hidden - when you click on "editorial controls" the box appears.

What I need is a hidden box which appears, when you click on it.
This box should be hidden when the page load the first time.

What have I to do to reach this goal?
Daniel
Member

Usergroup: Member
Joined: Jul 08, 2009

Total Topics: 17
Total Comments: 31
Daniel
Posted Apr 28, 2010 - 5:20 PM:

I found the solution:


<div class="feedbox" onclick="minmax('feedbox{LINKID}')">
<img src="feed1.gif" width="14" height="14" alt="FEED" title="SHOW FEEDS" class="feedpic">
</div>


<IF {SWITCH_FEEDS} and {LINKFEEDURLBOOL}>
<div class="" id="feedbox{LINKID}" style="display: none;">
<br /><br />
<span class="feeddata">Feed Data:</span><br /><br />
<IF not {LINKTOTALINFEED}>No items in this feed.</IF>
<!-- BEGIN 4 FEEDS -->
<a href="{FEEDLINK}" class="linktitle">{FEEDTITLE}</a> by {FEEDAUTHOR} on {FEEDPUBDATE}:
<br />{FEEDDESCRIPTION}
<br /><br />
<!-- END FEEDS -->
<a href="{LINKDETAILSURL}#feeddata" title="Link Details Page" class="feeddata">More Feed Data here . . .</a>
</div>
</IF>

------------------------------------

In short the solution is to declare:

style="display: none;"

So I have an Icon. When you click on it 4 FEEDS are there and a link to more.
I declared "display: none;" in the CSS before, but this didn`t work and you have to click the icon twice before you see the FEEDS.


Thanks very much for the help (and please apologize if I waste anybodies time.)




Search thread for
Download thread as
  • 0/5
  • 1
  • 2
  • 3
  • 4
  • 5



Sorry, you don't have permission to post posts. Log in, or register if you haven't yet.