Export (0) Print
Expand All

onmovestart event

Fires when the object starts to move.

Syntax

HTML Attribute <element onmovestart = "handler(event)">
Event Property object.onmovestart = handler;

Event information

SynchronousNo
BubblesNo
CancelableNo

Event handler parameters

pEvtObj [in]

Type: IHTMLEventObj

Standards information

There are no standards that apply here.

Remarks

The onmovestart event fires only when an editable element starts to move.

This event can only be bound to absolutely positioned elements.

Calls the associated event handler if there is one.

To invoke this event, do one of the following:

  • Start to move the editable object.

Examples

The following example shows how to use the onmovestart event with a movable DIV and have the background color and inner text change when the DIV starts to move.



<HTML>
<HEAD>
<TITLE>Editing events sample page</TITLE>
<SCRIPT>
// Turn on 2-D positioning
document.execCommand("2D-position",false,true);
// Function called when the onmovestart event is fired
function fnHandleMoveStart() {
  var oDiv = event.srcElement
  oDiv.style.backgroundColor = "green";
  oDiv.innerText = "I Started Moving";
}
function fnHandleMoveEnd() {
  var oDiv = event.srcElement
  oDiv.style.backgroundColor = "red";
  oDiv.innerText = "I Stopped";
}
</SCRIPT>
</HEAD>
<BODY  onmovestart="fnHandleMoveStart();" onmoveend="fnHandleMoveEnd();">
<DIV CONTENTEDITABLE="true">
<DIV style="width:300px;height:100px; color:white; background-color:red; 
position:absolute;">
My DIV</DIV>
</DIV>
</BODY>
</HTML>


See also

a
abbr
address
area
b
bdo
blockQuote
body
button
caption
cite
custom
dd
div
dl
dt
em
embed
fieldSet
form
hn
hr
i
iframe
img
input type=button
input type=checkbox
input type=file
input type=hidden
input type=image
input type=password
input type=radio
input type=reset
input type=submit
input type=text
ins
kbd
label
legend
li
object
ol
p
pre
q
rt
ruby
s
samp
select
small
span
strong
sub
sup
table
tBody
td
textArea
tFoot
th
tHead
tr
u
ul
var

 

 

Send comments about this topic to Microsoft

Build date: 11/14/2012

Show:
© 2014 Microsoft