HTML event attributes
The following events can be used to trigger a script processing action in the BlackBerry® Browser:
Attribute |
Value(s) |
Description |
Availability |
|---|---|---|---|
onblur |
script |
A blur event occurs when an element loses focus by either the pointer or by tabbed navigation. The onblur attribute can be applied to the following elements: |
4.6 or later |
onchange |
script |
A change event occurs when a form control loses focus after the user has modified the value. The onchange attribute can be applied to the following elements: |
4.6 or later |
onclick |
script |
A click event occurs when the user clicks the trackball or trackwheel on a BlackBerry® device. (or, for touchscreen devices, when the user performs a tap) The onclick event attribute can be applied to all elements except for <base>, <basefont>, <bdo>, <br>, <font>, <frame>, <frameset>, <head>, <html>, <iframe>,<meta>, <param>, <script>, <style>, or <title>. |
4.6 or later |
onfocus |
script |
A focus event occurs when an element gains focus by either the pointer or by tabbed navigation. The onfocus attribute can be applied to the following elements: |
4.6 or later |
onkeydown |
script |
A keydown event occurs when a key is pressed down while the pointer is over an element. The onkeydown attribute can be applied to all elements except for <base>, <basefont>, <bdo>, <br>, <font>, <frame>, <frameset>, <head>, <html>, <iframe>, <meta>, <param>, <script>, <style>, or <title>. |
4.6 or later |
onkeypress |
script |
A keypress event occurs when a key is pressed and released while the pointer is over an element. The onkeypress attribute can be applied to all elements except for <base>, <basefont>, <bdo>, <br>, <font>, <frame>, <frameset>, <head>, <html>, <iframe>, <meta>, <param>, <script>, <style>, or <title>. |
4.6 or later |
onkeyup |
script |
A keyup event occurs when a key is released while the pointer is over an element. The onkeyup attribute can be applied to all elements except for <base>, <basefont>, <bdo>, <br>, <font>, <frame>, <frameset>, <head>, <html>, <iframe>, <meta>, <param>, <script>, <style>, or <title>. |
4.6 or later |
onload |
script |
A load event occurs when the BlackBerry Browser finishes loading a new page or a complete frameset. The onload attribute can be applied to the following elements: |
4.6 or later |
onmousedown |
script |
A mousedown event occurs when the user depresses the trackwheel or trackball on a BlackBerry device. The onmousedown attribute can be applied to all elements except for <base>, <basefont>, <bdo>, <br>, <font>, <frame>, <frameset>, <head>, <html>, <iframe>, <meta>, <param>, <script>, <style>, or <title>. |
4.6 or later |
onmousemove |
script |
A mousemove event occurs when the user moves the pointer while it is over an element. The onmousemove attribute can be applied to all elements except for <base>, <basefont>, <bdo>, <br>, <font>, <frame>, <frameset>, <head>, <html>, <iframe>, <meta>, <param>, <script>, <style>, or <title>. |
4.6 or later |
onmouseout |
script |
A mouseout event occurs when the user moves the pointer off of an element. The onmouseout attribute can be applied to all elements except for <base>, <basefont>, <bdo>, <br>, <font>, <frame>, <frameset>, <head>, <html>, <iframe>, <meta>, <param>, <script>, <style>, or <title>. |
4.6 or later |
onmouseover |
script |
A mouseover event occurs when the user moves the pointer over an element. The onmouseover attribute can be applied to all elements except for <base>, <basefont>, <bdo>, <br>, <font>, <frame>, <frameset>, <head>, <html>, <iframe>, <meta>, <param>, <script>, <style>, or <title>. |
4.6 or later |
onmouseup |
script |
A mouseup event occurs when the user releases the trackwheel or trackball on a BlackBerry device. The onmouseup attribute can be applied to all elements except for <base>, <basefont>, <bdo>, <br>, <font>, <frame>, <frameset>, <head>, <html>, <iframe>, <meta>, <param>, <script>, <style>, or <title>. |
4.6 or later |
onreset |
script |
A reset event occurs when the user resets a form. The onreset attribute can be applied to the <form> element. |
4.0 or later |
onselect |
script |
A select event occurs when the user selects some text in a text field. The onselect attribute can be applied to the following elements: |
4.6 or later |
onsubmit |
script |
A submit event occurs when the user submits a form. The onsubmit attribute can be applied to the <form> element. |
4.0 or later |
onunload |
script |
An unload event occurs when the BlackBerry Browser removes a new page or a frameset. The onunload attribute can be applied to the following elements: |
4.6 or later |