• Welcome to Valhalla Legends Archive.
 

Easier Way?

Started by R.a.B.B.i.T, March 26, 2005, 07:51 PM

Previous topic - Next topic

R.a.B.B.i.T

http://www.liquid-server.org/liquidserver/index.php?page=protocol
I want to know if there is an easier way of having show/hide than using <span id="X"> and JavaScript.  I really dislike the code of that page, merely due to it's bulkyness.  It also gets annoyingly difficult to read.

IE:
<font face="courier new" size="2">

<span id="protocol_click" onclick="setvis('protocol_full', '');">
<font size="3"><B>Protocol</B></font>
</span><BR>
<span id="protocol_full">
<span id="logon_click" onclick="setvis('login_sequence', '');">
&nbsp;&nbsp;&nbsp;&nbsp;<B>Logon sequence</B>
</span><BR>
<span id="login_sequence">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[For registered logins]<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;XLS_SERVERVERSION&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0x01<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;XLS_LOGIN&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0x02<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ELS_CHECKLOGIN&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0x03<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;XLS_ENTERCHAT&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0x10<BR>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[For unregistered logins]<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;XLS_SERVERVERSION&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0x01<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;XLS_LOGIN&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0x52<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;RLS_CONFORM&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0x53<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;XLS_ENTERCHAT&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0x10<BR>
<BR>
</span>
<span id="headers_click" onclick="setvis('headers', '');">
&nbsp;&nbsp;&nbsp;&nbsp;<B>Headers</B>
</span><BR>
and it goes on!

quasi-modo

ARGH... I HAD TO TURN ON JAVASCRIPT TO GET TO THE CONTENT.

Basically you are going to have to use that onclick event handler to do what you seek. But I suggest that the div that the content is in be visible normally and then onpageload you make it invisible. That way people are going to be able to get to the content reguardless of weather they are part of the 10% of the internet that uses javascript or not.

Also, no there is not a better way to do it, but using the <span> is not really correct, you would be better off using a <div> I think... because <span> is inline.
WAR EAGLE!
Quote(00:04:08) zdv17: yeah i quit doing that stuff cause it jacked up the power bill too much
(00:04:19) nick is a turtle: Right now im not paying the power bill though
(00:04:33) nick is a turtle: if i had to pay the electric bill
(00:04:47) nick is a turtle: id hibernate when i go to class
(00:04:57) nick is a turtle: or at least when i go to sleep
(00:08:50) zdv17: hibernating in class is cool.. esp. when you leave a drool puddle

dxoigmn

Why not use <pre> instead of all those ugly spaces (&nbsp;)? You probably want to make the clicky-things look like links as well. When I first arrived at the page I didn't know what you were talking about until I read the rest of your post.

R.a.B.B.i.T

Hah!  Pre...I knew there was a tag for that, but I forgot it, thanks.  Also, I'm not done it all.  I was planning on adding little arrow images as a hint for clicking, but I 'spose I could link-like them.