WML
Event: onenterbackward

The
onenterbackward event is triggered if a user goes back to a
previous card through the WAP browser's URL history, and the WML code
placed in the event handler will be executed.

The
following WML example shows a situation in which the onenterbackward
event has to be used. It is used to prevent a user from going back to
a particular card. What we want to do is like this: We want to place
an advertisement in an intermediate card between the table of
contents and the chapters of a WML tutorial. If a user navigates to a
chapter from the table of contents, an advertisement will appear for
a few seconds. Later if the user presses the Back button to go back
to the table of contents, the WAP browser will not display the
advertisement again so as to reduce the disturbance to the user.

Below
shows the screenshots of the first card in some mobile phone
browsers. This card contains the table of contents of the tutorial.

Sony
Ericsson T610

Sony
Ericsson T68i

Nokia
Mobile Browser 4.0

If
you select the "Chapter 1: WML Introduction" anchor link,
you will see an advertisement in the mobile phone browser, like this:

Sony
Ericsson T610

Sony
Ericsson T68i

Nokia
Mobile Browser 4.0

If
you do not select the "Skip" anchor link, the mobile phone
browser will display Chapter 1 of the tutorial automatically after 3
seconds:

Sony
Ericsson T610

Sony
Ericsson T68i

Nokia
Mobile Browser 4.0

If
you select the "Go Back" anchor link, the onenterbackward
event will be triggered when the advertisement card is loaded. The
WML code associated with the onenterbackward event, that is
<prev/>, will be executed. So, the mobile phone browser will go
backwards once more and you will see the table of contents instead of
the advertisement.

What do you think about this web page? It is very helpful. It is helpful, but some information I wanted is missing. It is not helpful. It has broken links. It has typos / grammatical mistakes. It has incorrect information. Others

(Optional) Please provide us more details. For example, suppose you select option 2 above, can you tell us specifically what information is missing? You can also suggest anything that can help us improve this web page.

(Optional) Your name:

(Optional) Your email address:

Due to the amount of messages we received, we may not be able to reply to all messages.