Desktop Notebook, An SPA

18 October 2007

Google Notebook does not work offline. Yes, there’s Google Gears. But if the only time you want to wait for it to load is the time it takes Firefox to parse it off of your hard drive, you’re out of luck. It’s built on AJAX… note the A and X (Asynchronous and XML). This means you need a seperate XML/HTML/XHTML file to to save your actual data in. All the site does is load/display and save/modify that document. So, in short, no SPA from there. Look up anything you want, but I haven’t found anything similar that runs on Linux. There are other notebook options, yes, but I’m not looking for one designed for tablets and hand-written notes. I’m looking for a hierarchy-based system with headings and paragraphs of content. XML editors could do this, but not quite like I wanted. So I wrote my own.

It’s not quite done yet. You can find it in my Google Pages. The stylesheets are minimal, but usable. Semi-simple Javascript (using the DOM, of course) and some simple HTML is all it’s made of. Feel free to experiment, download a copy (just save it as it is; there aren’t any images or anything, it’s all just one file), etc. But there is one big problem: saving. You’ll find there is a “Save” button, and some working code. But you end up with no stylesheets, JS code, or anything of real value except for the text and divs. I know exactly what the problem is, with no way to fix it.

Javascript can access the HTML source of any element using element.innerHTML. So, logically, you should be able to get the code for the page using document.innerHTML. Unfortunately for me, no, it’s not that simple. In fact, I haven’t figured out how to do it. Thus, the ‘content’ variable in the saving function saves only the innerHTML of document.body (everything in the BODY tag). So, in addition to presenting this still-young SPA, I also ask for help: how do you get the entire source? TiddyWiki does it, or at least looks like it. But no matter how many times I look over the source code of it, the problem gets no clearer.

Entry Filed under: google, programming, web. .

Leave a Comment

Required

Required, hidden

Some HTML allowed:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <pre> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Trackback this post  |  Subscribe to the comments via RSS Feed


Blogroll

 

October 2007
S M T W T F S
« Sep   Nov »
 123456
78910111213
14151617181920
21222324252627
28293031  

Tags

blog bored digg friends games google hacks hockey LEGO linux movie music news organize programming real life school switchoff tech video web wii windows writing

RSS Twitter / kidko

RSS Digg