Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Utilitarian's scratchpad

by Utilitarian (Vicar)
on Apr 24, 2008 at 09:29 UTC ( #682594=scratchpad: print w/ replies, xml ) Need Help??

<html> <head> <title>Invisible divs</title> <script> function showDiv(nextDiv) { for ( var dnum = 0; dnum < 4; ++dnum ) // Change 4 to suit number +of divs in page { var currentDiv = document.getElementById("div" + dnum); currentDiv.style.display = ( currentDiv.id == nextDiv ) ? "blo +ck" : "none"; } } </script> </head> <body onload="showDiv('div0');"> <!-- change action below to suit your needs--> <form action="/cgi-bin/assesTest.pl"> <div id="div0" style="display: none;"> This will be the only bit visible at first <a href="#" onclick="showDiv('div1')">Next &gt;</a> </div> <div id="div1" style="display: none;"> This will be visible after clicking on the link at the end of the firs +t div <a href="#" onclick="showDiv('div2')">Next &gt;</a> </div> <div id="div2" style="display: none;"> This will be visible after clicking on the link at the end of the seco +nd div <a href="#" onclick="showDiv('div3')">Next &gt;</a> </div> <div id="div3" style="display: none;"> This is the last element to display <input type="submit"> </div> </form>
Log In?
Username:
Password:

What's my password?
Create A New User
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (8)
As of 2014-09-18 06:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (108 votes), past polls