I am trying to save a file which is generated by my main page in a new window. If I choose "save file as..." I get a copy of the original page in the first window. If I choose "view source" of the generated window I can copy and save that to get the page that I wanted. Basically I am reinventing the wheel by creating an editor much like the one used to create this post, only with client side javascript. Most javascript wiki,s use a variation of TidlyWiki,s save script which I don,t understand being new to javascript. So I thought it would be easier to pump the generated text to a new window and let the browser save the file locally. Any thoughts on how to save the gerated file would be appreciated.
My thoughts: never reinvent the wheel, ESPECIALLY when it comes to widely used open source programming
You need to post the user's data back to the server so it will generate a new not-editable page which could be saved or printed. Notice that your current model probably have problems with the browser's back option. To make it user friendly you should use Ajax for the post-back ...
Perhaps I miss used the term "client side". The whole thing resides on my computer. I mean to use it as a digital note book. It's inspired by StikWiki which is all one file. StikWiki is great but every single page is in that one file. I can see this file getting very large as I add my wiki notes to it. Therefore I am trying to slim it down and use it as a learning exercise along the way. I am pursuing a course of separate but linked pages. This is coming along well except for the "save" problem.
If I understand your post, you are trying to save to a file via javascript? I don't think that will ever work, as I belive that is one of the limits of javascript, it has very limited file system IO. Posting to the server with javascript which "pushes" a document for the user to save is possible.
There is fire fox add-on which might meet your needs - It is called "Google notebook" - You should try it.