The SitePoint Forums have moved.

You can now find them here.
This forum is now closed to new posts, but you can browse existing content.
You can find out more information about the move and how to open a new account (if necessary) here.
If you get stuck you can get support by emailing forums@sitepoint.com

If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

show/hide script with scrollbar script

The show/hide script is essentially working for me. You can view it at work at http://www.subminimal.ca/digipaint1_gangs.html . But, it is not interacting well with a javascript scroller one I've used (see my previous post). What is supposed to happen is that there is no text to start with. When you click on "description", the text shows up.

If the text goes beyond the alloted space, a scrollbar kicks in to move text up and down. If not needed, then scrollbar does not show up. This DOES WORK when the show/hide script is removed.

But... in IE 5.2.3 and Mozilla Firebird, the scrollbar does not show up, so you can't read rest of text. In Safari 1.2, the text scroller is there and works (sort of), but the scroll bar is there even before you see the text. The scroll bar is ALWAYS there, even when there is no text to scroll.

/* this is not yet working properly and is not properly constrained. Goes all the way to the top of window. */
this.trackTop = this.dragObj.getTop(); // Scrollbar top contraint
this.trackLength = this.trackHeight-this.dragHeight; // Adjusted track height
this.trackBottom = this.trackTop+this.trackLength; // Scrollbar bottom contraint

// Hide and Show Function. -- problem: hides the top global nav! Solution: fixed this.
/* Problem STILL OCCURS in IE only, but only when clicking on the "description" button AFTER clicking on the refresh button. No problem, as long as I don't click on the refresh button. Very strange behaviour!*/
/* hiding and showing the content Function, and hiding the semi-transparent image over the main image by calling one or the other divs. */
// Wondering if instead, I can change the z index on the fly?
function appearDisappear() {
if (!document.getElementById) return false;

if (secretObj.style.display == "block") {
secretObj.style.display = "none";
bkgr.style.display = "none";
/* I am trying to code to have the scroll bars appear when needed, and disappear when not. Right now, they never show up in IE or Mozilla, and always show up in Safari (even when content is hidden). Not working yet!
function getFunction(myScroll){
myScroll.hideVis();
}
*/
} else {
secretObj.style.display = "block";
bkgr.style.display = "block";
/*
function getFunction(myScroll){
myScroll.showVis();
}
*/
}
}