{"id":82,"date":"2010-03-31T16:50:57","date_gmt":"2010-03-31T14:50:57","guid":{"rendered":"http:\/\/www.tapper-ware.net\/blog\/?p=82"},"modified":"2010-03-31T16:50:57","modified_gmt":"2010-03-31T14:50:57","slug":"googlesuggest-on-playstationportable","status":"publish","type":"post","link":"https:\/\/www.tapper-ware.net\/blog\/googlesuggest-on-playstationportable\/","title":{"rendered":"GoogleSuggest on PlayStationPortable"},"content":{"rendered":"<p>Web developers fear the PSP &#8230; and with good reason. The NetFront browser is well, how do I put this&#8230; &#8220;in need of improvements&#8221; to the point where it feels intentionally crippled. <\/p>\n<p>Point in case: The support for iFrames. It&#8217;s surprisingly good, but for some reason you can&#8217;t change an iFrame&#8217;s content by setting the src Attribute. One might thing that this is because iFrames are not dynamic, but alas: No.<\/p>\n<p>The reason why setting the src Attribute doesn&#8217;t work is because it&#8217;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:<\/p>\n<p>window.frames[0].document.location.replace(newUrl);<\/p>\n<p>What we do here is use the legacy frames API to dive down into the iframe&#8217;s content, then do a location.replace inside and voil\u00e0.<\/p>\n<p>The net effect is that we can now do AJAX&#8230; 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.<\/p>\n<p>This for example, wraps GoogleSuggest in such a callback:<\/p>\n<p>http:\/\/www.tapper-ware.net\/devel\/js\/JS-PSPKeyboard\/suggestEcho.php?q=moz<\/p>\n<p>Add a few form elements, and you&#8217;ve got GoogleSuggest on the PSP (it&#8217;s not pretty yet, but it works). Note that this works, but won&#8217;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.<\/p>\n<p>http:\/\/www.tapper-ware.net\/devel\/js\/JS-PSPKeyboard\/<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Web developers fear the PSP &#8230; and with good reason. The NetFront browser is well, how do I put this&#8230; &#8220;in need of improvements&#8221; to the point where it feels intentionally crippled. Point in case: The support for iFrames. It&#8217;s surprisingly good, but for some reason you can&#8217;t change an iFrame&#8217;s content by setting the &hellip; <a href=\"https:\/\/www.tapper-ware.net\/blog\/googlesuggest-on-playstationportable\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">GoogleSuggest on PlayStationPortable<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/www.tapper-ware.net\/blog\/wp-json\/wp\/v2\/posts\/82"}],"collection":[{"href":"https:\/\/www.tapper-ware.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.tapper-ware.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.tapper-ware.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.tapper-ware.net\/blog\/wp-json\/wp\/v2\/comments?post=82"}],"version-history":[{"count":0,"href":"https:\/\/www.tapper-ware.net\/blog\/wp-json\/wp\/v2\/posts\/82\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.tapper-ware.net\/blog\/wp-json\/wp\/v2\/media?parent=82"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.tapper-ware.net\/blog\/wp-json\/wp\/v2\/categories?post=82"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.tapper-ware.net\/blog\/wp-json\/wp\/v2\/tags?post=82"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}