News example, 7 news example – Grandstream GXV3140 GMI Guide User Manual
Page 39

Grandstream Networks, Inc.
GMI HTML SDK and API Guide
Page 39 of 43
www.grandstream.com
Last Updated: 09/2010
6.7 News Example
Figure 7: News Example illustration1
Refer to the code and the comments below for the implementation of News Example:
File:news.html
/******************************************************************************
* After the page loads, map the up/down button to tab button. 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
=
"news-body"
>
<
iframe
src
=
"iframe-news.html"
id
=
"iframe-news"
>
</
iframe
>
<
table
id
=
"softkey"
>
<
tr
width
=
"100%"
>
<
td
width
=
"40px"
>
</
td
>
<
td
width
=
"100px"
align
=
"center"
>
<
a
>
</
a
>
</
td
>
<
td
onclick="GMIEngine.refresh
()
;"
width
=
"100px"
align
=
"center"
>
<
a
><
font
class
=
"softkey"
>
Refresh
</
font
></
a
>
</
td
>