Jump to content

JavaScriptacular Question


mrdennis

Recommended Posts

Okay, truth time, I'm not very good with all this javascript stuff. As a matter of fact, I leave trails of breadcrumbs behind me every time I attempt to create a javascript anything.I want to make a block, a wonderful-not-quite-square block. In this block is going to be a long series of news bulletins; however! you can only see the first two(ish) before the overflow:hidden cuts the whole list off. "ooooh, this sucks", you say, " I really want to read the rest of them Matt". Okay sure, just hover over the box, "OH JESUS A COOL LOOKING GRAPHIC INDICATING THE ABILITY TO EXPAND THIS WINDOW JUST POPPED UP!!". As it should, then you summon the courage to click on the graphic and BAM! the box expands to a much greater height, and it switches to overflow:auto.Now we can read everything in the box.Or at least that was the dream I had last night, that's not the only dream mind you. I don't want to give the impression that I am obsessed per-se over this concept. There was also a dream where and old female friend of mine and myself were on some type of vacation(dinner?) at the lighthouse of alexandria(or at least what I imagine it looked like at the bottom, hasn't actually been there for quite a while, I hear). And then you know, other stuff.In case you didn't gather the point of my seemingly crazed ramblings, I need help making this a reality-- and I am talking about the text box here, not the other one, that's my job, weirdo.

Link to comment
Share on other sites

el=document.getElementById("my_element");el.style.height = "200px"; // or whatever value you wantel.style.overflow = "auto";----I'd recommend against having the expand button/link/whatever appear only when the user mouses over the box. A user may want the expansion functionality but not guess that to find it you have to go looking for it. I'd have the expand button visible always, but change it to a collapse button when the box is expanded.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...