357Chapter 15Generic HTML Element (Web design rates) ObjectsRelated Item:readyStateproperty. onresizeCompatibility:WinIE4+, MacIE4+,

357Chapter 15Generic HTML Element ObjectsRelated Item:readyStateproperty. onresizeCompatibility:WinIE4+, MacIE4+, NN4+, Moz1+, Safari1+ The onresizeevent handler fires whenever an object is resized in response to a variety ofuser or scripted actions. Most elements include this event handler, provided the object hasdimensional style attributes (for example, height, width, or position) assigned to it. In IE4+ and NN6+/Moz1+, the onresizeevent does not bubble. Resizing the browser windowor frame does not cause the window s onloadevent handler to fire. ExampleIf you want to capture the user s resizing of the browser window (or frame), you can assign afunction to the onresizeevent handler either via scriptwindow.onresize = handleResize; or by an HTML attribute of the bodyelement: Related Item:window.resize()method. onresizeendonresizestartCompatibility:WinIE5.5+, MacIE-, NN-, Moz-, Safari- The onresizeendand onresizestartevent handlers fire only on a resizable object inWindows edit mode. Related Item:oncontrolselectevent handler. onselectstartCompatibility:WinIE4+, MacIE4+, NN-, Moz-, Safari- The onselectstartevent handler fires when a user begins to select content on the page. Selected content can be inline text, images, or text within an editable text field. If the userselects more than one object, the event fires in the first object affected by the selection. ExampleUse the page from Listing 15-46 to see how the onselectstartevent handler works when auser selects across multiple elements on a page. As the user begins a selection anywhere onthe page, the ID of the object receiving the event appears in the status bar. Notice that theevent doesn t fire until you actually make a selection. When no other element is under thecursor, the bodyelement fires the event. Listing 15-46: Using the onselectstart Event Handler ContinuedelementObject.onselectstart

Leave a Reply