PDA

View Full Version : Computer Question


SSJPabs
10-29-2004, 05:55 AM
Well I do web-design on the side for organizations that I'm a part of, or on rare occasions for fun (not that I have much time these days.) Well I have a question about scripting. I can only show you what is is.

Go to this page: http://home.stny.rr.com/nward1/apiary/guide.htm

Read the fun I Love Bees ARG if you want, but my question is this: At the end of some of the text, there is a § symbol. When you click on it, there is a large box that appears underneath it. You click the symbol again to close it.

How did he do that? I don't even know what its called so I can look it up myself. If anyone could help me, I'd appreciate it because I really would like to be able to do this.

EDIT: I did email him but no reply.

Rafeal v1.0
10-29-2004, 10:35 AM
I think this is how he did it

<a href="#" class=symbol onclick="WM_toggle('jy1a'); return false"><font size="3">§</font></a>
<blockquote id="jy1a" class=insideb style="display: none"><blockquote class=black>
<center>HALT - MODULE CORE HEMORRHAGE
<br>
<br>Control has been yielded to the
<br>SYSTEM PERIL DISTRIBUTED REFLEX.
<br>
<br>This medium is classified, and has a
<br>STRONG INTRUSIVE INCLINATION.
<br>
<br>In 11 days, network throttling will erode.
<br>
<br>In 25 days this medium will metastasize.
<br>
<br>COUNTDOWN TO WIDE AWAKE AND PHYSICAL:
<br>38:13:16:32:235

<br>
<br>Make your decisions accordingly.</center>
</blockquote></blockquote>

SSJPabs
10-29-2004, 03:00 PM
Whew! That doesn't quite work but it's pretty close and I think I can tweak it to make it work. Thanks, I really owe you!

Space Kitty
10-29-2004, 04:09 PM
save and reference as guidescript.js

var ns6=document.getElementById&&!document.all?1:0
//*********************************
// Text Box Toggles *
//*********************************
function WM_toggle(ID){
if (ns6){
if (document.getElementById(ID).style.display=="none")
document.getElementById(ID).style.display="block";
else
document.getElementById(ID).style.display="none";
}
else{
if (document.all[ID].style.display=="none")
document.all[ID].style.display="block";
else
document.all[ID].style.display="none";
}
}
//*********************************
// Cookie For Text Boxes *
//*********************************
function setCookie(){
var jy1a = isHidden("jy1a")
var jy1b = isHidden("jy1b")
var jy1c = isHidden("jy1c")
var jy1d = isHidden("jy1d")
var jy1e = isHidden("jy1e")
var jy1f = isHidden("jy1f")
var jy1h = isHidden("jy1h")
var jy1i = isHidden("jy1i")
var jy1j = isHidden("jy1j")
var jy1k = isHidden("jy1k")
var jy1l = isHidden("jy1l")
var jy1m = isHidden("jy1m")
var jy1n = isHidden("jy1n")
var jy1o = isHidden("jy1o")
var jy1p = isHidden("jy1p")
var jy1q = isHidden("jy1q")
var jy1r = isHidden("jy1r")
// +"/XXXX:"+xxxx <--format to add new values
var values = "1a:"+jy1a+"/1b:"+jy1b+"/1c:"+jy1c+"/1d:"+jy1d+"/1e:"+jy1e+"/1f:"+jy1f+"/1h:"+jy1h+"/1i:"+jy1i+"/1j:"+jy1j+"/1k:"+jy1k+"/1l:"+jy1l+"/1m:"+jy1m+"/1n:"+jy1n+"/1o:"+jy1o+"/1p:"+jy1p+"/1q:"+jy1q+"/1r:"+jy1r;
//
var the_cookie = "mammenu=" + escape(values);
document.cookie = the_cookie;
// alert(the_cookie);
}
function isHidden(ID){
var crossobj = ns6? document.getElementById(ID).style.display : document.all[ID].style.display;
return (crossobj=="none")? "none" : "block";
}
function readCookie(){
var the_cookie = document.cookie;
// alert(the_cookie);
if (the_cookie != ""){
var the_cookie = unescape(the_cookie);
var my_cookie = the_cookie.split(";");
var broken_cookie = my_cookie[0].split("=");
var cookie_chunks = broken_cookie[1].split("/");
for (var loop = 0; loop < cookie_chunks.length; loop++){
menu_value = cookie_chunks[loop];
var broken_menu = menu_value.split(":");
var menu = broken_menu[0];
var value = broken_menu[1];
setMenu(menu, value);
}
}
}
function setMenu(ID,disp){
if (ns6){
document.getElementById("jy"+ID).style.display = disp;
// document.getElementById(ID).style.display = disp;
}
else{
document.all["jy"+ID].style.display = disp;
// document.all[ID].style.display = disp;
}
}
//*********************************
// OnLoad/UnLoad *
//*********************************
window.onload = init;
window.onunload = setCookie;