Document on the web

How can I see in JavaScript: is document new or is editing? There are some commands?

Subject: Document on the web

Take a look at the URL. New documents have this:

http://server/path/db.nsf/FormName?OpenForm&OtherStuff

Existing documents being edited have this:

http://server/path/db.nsf/view/UNIDorKey?EditDocument&OtherStuff

The simplest calculation would be to look for

window.location.search.toLowerCase().indexOf(‘editdocument’)

since existing documents cannot be edited without that value in the query string at position 0 and new documents cannot have that value in the query string at position 0.