spacer

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

home / experts / javascript / column12


General Selections

Developer News
Microsoft Shows Off Silverlight 4, IE9 Plans
Metasploit Expands Vulnerability Test Framework
HyperCard Reborn?

In Navigator 4.0x it is only possible to select text. For example, when you drag the mouse over an image, the image is not highlighted. The browser simply selects the text before and after the image, based on the document flow. The height of the selection depends on the size of the text. It is not possible to find out what type of text is selected.

Internet Explorer 4.0x differs from Navigator 4.0x in many ways. In Internet Explorer 4.0x it is possible to select almost any element on the page. For example, you can select text, images, and buttons. However, some elements, such as SELECT menus, cannot be selected.

Unlike most other programs, a selection in Navigator 4.0x remains active (highlighted) even if focus is removed from the page. For example, if you drag the mouse over a portion of the document, and then click a button on the page, Navigator 4.0x doesn't deselect the text. As opposed to Navigator 4.0x, a selection in Internet Explorer 4.0x is deactivated when focus is removed from the selected element. For instance, when you click a button on the page, the browser deselects the current selection.

In both fourth-generation browsers, the selection is deactivated when you select a portion of the document, and then click a link. Therefore, you cannot implement a script that asks the user to click a link in order to execute a script that displays the current selection. We'll take advantage of the new events in Navigator 4.0x and Internet Explorer 4.0x to display the user's selection when he or she releases the mouse button. In other words, we'll evaluate the selection when a mouseup event occurs.

http://www.internet.com

internet.commediabistro.comJusttechjobs.comGraphics.com

Search:

WebMediaBrands Corporate Info

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

webref The latest from WebReference.com Browse >
Rolling Out Your Own HTML Application Version Control · HTML 5: Client-side Storage · Working with Ajax Server Extensions
Sitemap · Experts · Tools · Services · Email a Colleague · Contact FREE Newsletters 
 The latest from internet.com
Wi-Fi Product Watch, November 2009 · Chip Market Recovering From '08 Collapse · Low-Cost Tools to Kickstart Your New Business


Created: January 29, 1998
Revised: January 29, 1998

URL: http://www.webreference.com/js/column12/general.html