You are here: Reference > JavaScript > client-side > event handling > events > onresizestart

onresizestart event | resizestart event

Browser support:
Occurs when the user starts to resize an element in an editable region.
An editable region can be specified with the contentEditable and designMode properties.
If you would like to receive a notification when the user starts dragging an element, use the onmovestart event.

How to register:

<ELEMENT onresizestart="handler">

In JavaScript:
object.onresizestart = handler;
object.attachEvent ("onresizestart", handler);
You can find the related objects in the Supported by objects section below.
The event object is accessible to all event handlers in all browsers. The properties of the event object contain additional information about the current event. To get further details about these properties and the possible event handler registration methods, please see the page for the event object.
For a complete list of events, see the page for Events in JavaScript.

Basic information:

Bubbles Yes
Cancelable Yes
Event object -

Actions that invoke the onresizestart event:

  • Starting to resize an element in an editable region.

The order of events related to the onresizestart event:

  1. onresizestart
  2. onresize
  3. onresizeend

Example HTML code 1:

This example dumps the order of events while the user is resizing an absolute positioned element:
    <script type="text/javascript">
            // the '2D-position' command throws an exception in Firefox
        try {
                // enables moving absolute and relative positioned elements by dragging
            document.execCommand ("2D-position", false, true);
        catch (e) {};
        function DumpInfo () {
            var info = document.getElementById ("info");
            info.innerHTML += event.type + ", ";
    Select and resize the blue element with your mouse!
    <div contenteditable="true" style="border:1px solid #000000; height:200px;">
        <div style="width:200px;height:80px; background-color:blue; position:absolute;"
                onresizestart="DumpInfo ()" onresize="DumpInfo ()" onresizeend="DumpInfo ()">
    <br /><br />
    <div id="info" style="background-color:#f0f0ff; font-weight:bold;"></div>
Did you find this example helpful? yes no

Supported by objects:

Related pages:

External links:

User Contributed Comments

Post Content

Post Content