The method writeln is the same as write but a new line (carriage return, return character, whatever) will be placed at the end of the line.
You may have noticed the open() and close() methods. These calls open a stream from one object to another. In other words you need to open the door to other objects before you can start talking to them. Just be sure to close the door when you're done. One sidenote regarding open() is that it will clear the target window. Don't forget that.
There are some other features for open(). open() by itself implies that you are opening a text/html document. This means you can only send over plain text (or HTML). If you wish to send something else, then you can specify that MIME Type. Some MIME types are image/gif, or image/jpeg. So if you open it with a gif type, then it will expect you to send a GIF image. Example:
document.open("image/gif");For more information, check out a handy reference.
If you wish to change the URL location of another window (or the current window for that matter), you can use the location property of the document object. Example:
document.location="http://www.yahoo.com/";If you wish to load a document in a specific frame, just reference it appropriately.