HTML/Javascript problems.
Okay, here's the deal: For any of you that have tried to program webpages for the PSP, you know how hard it is to get anything dynamic on the page. I'm trying to get a page set up, so I can quickly access it from my PSPs MS.
Here's the code:
function toggleHide(obj) {
if (obj.style.display == 'none'){obj.style.display = '';}
else{obj.style.display = 'none';}
}</script>
<a href="javascript:toggleHide('test')">Toggle Section Display</a>
<a href="#" onclick="toggleHide('test')">Toggle Section Display</a>
<div id='test' style='display:none;'> Hello World </div>
-OR-
function toggleHide(obj) {
if (obj.style.visibility == 'collapse'){obj.style.visibility = 'visible';}
else{obj.style.visibility = 'collapse';}
}</script>
<a href="javascript:toggleHide('test')">Toggle Section Visibility</a>
<a href="#" onclick="toggleHide('test')">Toggle Section Visibility</a>
<div id='test' style='visibility:collapse;'> Hello World </div>
These codes work flawlessly in browsers. The problem appears that the PSP cannot handle the javascript changing the style.
Is there another way to do this? I have large sections of text that, if aren't hidden, would be almost 140 pages in length (PSP size).
The use of this is to instantly add, and remove content from the page, and having the page change it's length, without importing anything.
Hide/show can be done CSS only for years now. For example: http://www.devinrolsen.com/tutorials/css/css_display_hide_content/index.php
This almost works. After downloading it, I tested it, and the problem persists, because I have 5 levels of hide/view data.
<a href="javascript:toggleHide('cat1')">Catagory 1</a><br>
<div style='display:none;' id='cat1'>
<a href="javascript:toggleHide('sub1cat1')">Sub catagory1</a><br>
<div style='display:none;' id='subcat1'>
..........
</div>
</div>
That CSS only code only works with one level. If there really is nothing else, I will end up using this. So, thanks.
Is there a way to form this into multiple levels? i.e. have another hidden set inside of a hidden box, continuing on for 5 levels?
Or is there another way to show/hide <div>s of text?