spacer

Webref WebRef   Sitemap · Experts · Tools · Services · Newsletters · About i.com

home / experts / javascript / column49


Using JavaScript in HomeSite 4.0, Part II

Developer News
Google Going Native With Chrome
Mozilla Fixes Firefox Flaws as 3.5 Release Nears
Microsoft and Novell Still Bosom Buddies

The ActiveDocument Object's Properties

The ActiveDocument Object is very useful in manipulating the active document, i.e. the document currently visible in the editing window. We describe its properties and methods in this and next few pages of the column. Here are its properties:

CanUndo Read-only Boolean

Returns a true value if recent changes can be undone.

CanRedo Read-only Boolean

Returns a true value if recent changes can be re-done.

Filename Read-only String

Returns the file name of the active document.

Lines(index) Read-Write String

Gets or sets the line at the specified index. For example, the JavaScript line app.ActiveDocument.Lines(1) gets the contents of the active document's second line. The following code sets this line to "Hello There":

app.ActiveDocument.Lines(1) = "Hello There";

LineCount Read-only Integer

Returns the number of lines in the active document.

Modified Read-only Boolean

Returns a true value if the active document has been modified since it was last saved to disk.

ReadOnly Read-only Boolean

Returns a true value if the active document is read-only.

SelStart Read-Write Integer

Gets or sets the selection portion's starting character index, counting from the beginning of the document. When setting this property, the cursor is positioned at the specified position. See also SelLength.

SelLength Read-Write Integer

Gets or sets the selection portion's character length. See also SelStart.

SelText Read-Write String

Gets or sets the selection portion's contents. See also SelStart.

TabIndex Read-Write String

Gets or sets the tab index of the active document. Setting this property does not seem to be working.

Text Read-only String

Gets or sets the contents of the active document.

http://www.internet.com

Produced by Yehuda Shiran and Tomer Shiran

internet.commediabistro.comJusttechjobs.comGraphics.com

Search:

WebMediaBrands Corporate Info

Legal Notices, Licensing, Reprints, Permissions, Privacy Policy.
Advertise | Newsletters | Shopping | E-mail Offers | Freelance Jobs

webref The latest from WebReference.com Browse >
XML and PHP Simplified · Creating a ASP.NET Contact Form · Data Filtering with PHP
Sitemap · Experts · Tools · Services · Email a Colleague · Contact FREE Newsletters 
 The latest from internet.com
Intel to Host Live Nehalem Q&A · 12 Tips to Troubleshoot Network File-Sharing · 10 Tips for Selling on Kijiji


Created: September 27, 1999
Revised: September 27, 1999

URL: http://www.webreference.com/js/column49/activeprop.html