GoogleSuggest on PlayStationPortable

Web developers fear the PSP … and with good reason. The NetFront browser is well, how do I put this… “in need of improvements” to the point where it feels intentionally crippled.

Point in case: The support for iFrames. It’s surprisingly good, but for some reason you can’t change an iFrame’s content by setting the src Attribute. One might thing that this is because iFrames are not dynamic, but alas: No.

The reason why setting the src Attribute doesn’t work is because it’s been stripped of its setter which usually causes the document to change. The functionality is still there, you just have to address it differently:

window.frames[0].document.location.replace(newUrl);

What we do here is use the legacy frames API to dive down into the iframe’s content, then do a location.replace inside and voilĂ .

The net effect is that we can now do AJAX… well kind off: we can load different documents and if these reside on the same domain as the host document, we can let these documents trigger callbacks in our code to deliver data.

This for example, wraps GoogleSuggest in such a callback:

http://www.tapper-ware.net/devel/js/JS-PSPKeyboard/suggestEcho.php?q=moz

Add a few form elements, and you’ve got GoogleSuggest on the PSP (it’s not pretty yet, but it works). Note that this works, but won’t look good on a PC as font sizes are nonsensical and are meant to force the PSP browser to either use the big or the small font.

http://www.tapper-ware.net/devel/js/JS-PSPKeyboard/

Leave a Reply

Your email address will not be published. Required fields are marked *

*

This site uses Akismet to reduce spam. Learn how your comment data is processed.