Grandstream GXV3140 GMI Guide User Manual
Page 22

Grandstream Networks, Inc.
GMI HTML SDK and API Guide
Page 22 of 43
www.grandstream.com
Last Updated: 09/2010
// After the page loads, call the API function GMIEngine.mapleftright2tab(); to map
the left/right button to tab/alt+tab
function
bind_tab
()
{
GMIEngine.mapleftright2tab
()
;
}
//When the page unloads, revoke the key mapping
function
unbind_tab
()
{
GMIEngine.revokemap
()
;
}
……
/******************************************************************************
* After the page loads, call the API function GMIEngine.mapleftright2tab(); to map
the left/right button to tab/alt+tab. When the page unloads, revoke this mapping so
that it would not influence other pages.
* At the same time, all the key events are handled by the softkey_process function.
******************************************************************************/
<
body
onload="bind_tab
()
;"
onunload="unbind_tab
()
;"
onkeydown="softkey_proce
ss
(
event
.keyCode
)
;"
id
=
"call-body"
>
/******************************************************************************
* Use an iframe to display the contact list, call button and procedure call button.
Users can make use of iframe to generate scroll windows.
******************************************************************************/
<
iframe
src
=
"call-iframe.html"
id
=
"iframe-call"
>
iframe
>
/******************************************************************************
* Draw softkey in html
******************************************************************************/
<
table
id
=
"softkey"
>
<
tr
width
=
"100%"
>
<
td
width
=
"40px"
>
td
>
<
td
width
=
"100px"
align
=
"center"
>
<
a
><
font
class
=
"softkey"
>
Backspace
font
>
a
>