View Single Post
Old 08-29-2008, 03:56 PM   #4 (permalink)
Costin Trifan
Meeow!
 
Costin Trifan's Avatar
 
Join Date: 04-13-07
Location: Romania
Posts: 3,235
iTrader: 0 / 0%
Latest Blog:
None

Costin Trifan is a web professional of the highest orderCostin Trifan is a web professional of the highest orderCostin Trifan is a web professional of the highest orderCostin Trifan is a web professional of the highest orderCostin Trifan is a web professional of the highest orderCostin Trifan is a web professional of the highest orderCostin Trifan is a web professional of the highest orderCostin Trifan is a web professional of the highest orderCostin Trifan is a web professional of the highest orderCostin Trifan is a web professional of the highest orderCostin Trifan is a web professional of the highest order
for that, you need to prevent the default action:

Code:
function preventDefault(evt) { if (evt.preventDefault) { // FIREFOX return evt.preventDefault(); } else { // IE return evt.returnValue = false; } } function toggleview(element1, event) { preventDefault(event); element1 = document.getElementById(element1); return element1.style.display = (element1.style.display != 'block') ? 'block' : 'none'; }
And in your html (because you hard-coded everything):
Code:
<div class="peekaboo"> <a href="#" onclick="toggleview('q5', event)">[show]</a> </div>
__________________
...to be continued
Costin Trifan is offline   Reply With Quote