| Author |
HTML/Javascript problems. |
FallFromINFINITY
Member
Posts: 9
Location:
Joined: 23.03.09 Rank: Apprentice |
|
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:
<scblockedript language='javascblockedript'>
function toggleHide(obj) {
if (obj.style.display == 'none'){obj.style.display = '';}
else{obj.style.display = 'none';}
}</scblockedript>
<a href="javascblockedript:toggleHide('test')">Toggle Section Display</a>
<a href="#" onblockedclick="toggleHide('test')">Toggle Section Display</a>
<div id='test' style='display:none;'> Hello World </div>
-OR-
<scblockedript language='javascblockedript'>
function toggleHide(obj) {
if (obj.style.visibility == 'collapse'){obj.style.visibility = 'visible';}
else{obj.style.visibility = 'collapse';}
}</scblockedript>
<a href="javascblockedript:toggleHide('test')">Toggle Section Visibility</a>
<a href="#" onblockedclick="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 javascblockedript 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.
--------------------------------------------------------------------
Who is "General Error" and why is he reading my harddisk? |
|
| Author |
RE: HTML/Javascript problems. |
spyware
Member

Posts: 4190
Location: The Netherlands
Joined: 14.04.07 Rank: God Warn Level: 90
|
|
Hide/show can be done CSS only for years now. For example: http://www.devinrolsen.com/tutorials/css/css_display_hide_content/index.php

"The chowner of property." - Zeph Widespread intellectual and moral docility may be convenient for leaders in the short term,
but it is suicidal for nations in the long term. - Carl Sagan Since the grid is inescapable, what were the earlier lasers about? Does the corridor have a sense of humor? - Ebert |
|
| Author |
RE: HTML/Javascript problems. |
FallFromINFINITY
Member
Posts: 9
Location:
Joined: 23.03.09 Rank: Apprentice |
|
This almost works. After downloading it, I tested it, and the problem persists, because I have 5 levels of hide/view data.
<a href="javascblockedript:toggleHide('cat1')">Catagory 1</a><br>
<div style='display:none;' id='cat1'>
<a href="javascblockedript: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?
--------------------------------------------------------------------
Who is "General Error" and why is he reading my harddisk?
Edited by FallFromINFINITY on 01-09-09 17:41 |
|
| Author |
RE: HTML/Javascript problems. |
elmiguel
Member

Posts: 132
Location: Your Computer
Joined: 12.12.07 Rank: God |
|
Have you tried setting your zindex?
The philosophy of one century is the common sense of the next. -Fortune Cookie
I would like to thank a few friends that I have made here that helped me and deserve to be mentioned:
System_Meltdown, Futility, nvrlivenvrdie, Mastergamer, TrueHacker, S1L3NTKn1GhT, Reelix, ynori7, Demons Halo, kryptor
|
|
| Author |
RE: HTML/Javascript problems. |
FallFromINFINITY
Member
Posts: 9
Location:
Joined: 23.03.09 Rank: Apprentice |
|
Just tried it. Still not working.
--------------------------------------------------------------------
Who is "General Error" and why is he reading my harddisk?
Edited by FallFromINFINITY on 04-09-09 00:36 |
|