The ASP technology in WAP
WML Basic Language
"P" element
Functions like HTML, but if you want to display text this is a must.
"Do" element
In fact, each WAP application must support the navigation bar. The value of the most important type attribute of the Do label is accept, which means that when you press the soft key A new option is added to the list. The Label property specifies the text to display. There are also some options:
Go-Navigate to another card or plate. He needs the href attribute.
Prev-Navigate to the previous card
Refresh-Refreshes the display.
NoOp-None
Anchor
function is the same as in HTML. The anchor link in WML has the same effect as do, and the only difference is that anchor is not displayed in the form of an option.
< anchor >
Go to Card 2
< go href= "#card2"/>
</anchor >
Variable
The WML binding variable is a bit different from HTML and JavaScript. The WML variables can be invoked not only by WMLScript, but also by using the card directly for WML documents. In other words, variables can be entered not only by the user, but also by the setvar element. Of course variables can be manipulated by scripts, but this is not necessary! This point of view must be further emphasized and clarified. For example, you may need a card to get the user's name, the next card will show "Hello, flying Knife", we can do this "hello,$ (FirstName)", a bit like PHP, is not, this in the traditional HTML is impossible!
Since the values of variables can be saved between the card, they are often used to save state information and support some complex, interactive WAP services. One problem with this approach is that when the entire deck has to be referenced again, these states may not be synchronized with the user's browsing. Therefore, some events and properties are used to capture these events (Onenterofrward and Onenterbackward). Refreshes are used to update the card based on the values of some variables.
User input
Of course, to make your page more powerful, variables need to store (receive) the user's standard input. This is done through some HTML-like elements.
Input-much like HTML, the user enters through the keyboard of the phone. As you can imagine, this type of input is not as practical as the keyboard we use on the PC, so we should try to simplify this input and possibly use the Select element as much as possible for the user to choose. The Name property is the variable, and the default value and size attribute are clearly required. The format specifies an input mask for the input entry. Others, please check other information, I will not tell each of them!
Select/option-a list of user options. It's also like HTML:
< select Name= ' movie ' >
< option value= ' 1 ' >eyes Wide shut</option >
< option value= ' 2 ' >notting hill</option >
:
< option value= ' >buena Vista Social club</option >
</select >
The Multiple=true property tells the user that the proxy (browser) multiple selections are allowed. The Onpick event occurs when an option is selected/canceled.
Postfield-Much like the hidden attribute in HTML, it will not appear on the screen. It can transmit name and value to the server at the same time.
FieldSet-Contains a whole bunch of information to force the phone to appear on a screen, but it depends on the phone's ability.
The other elements
The IMG element is also supported, but you have to use a special picture format called Wbmp. Because WAP phones have limited memory and storage space. This new format enables WAP devices to quickly understand and generate pictures. The generation of Wireless bitmaps can be done by downloading a Photoshop and Paint Shop Pro plugin. Finally, remember to set the correct MIME type on your server, and I'll list all the WAP-related mime:
WML TEXT/VND.WAP.WML
WMLC APPLICATION/VND.WAP.WMLC
WMLSC APPLICATION/VND.WAP.WMLSCRIPTC
WMLScript Text/vnd.wap.wmlscript
WS Text/vnd.wap.wmlscript
WSC APPLICATION/VND.WAP.WMLSCRIPTC
WMLS Text/vnd.wap.wmlscript
Wbmp image/vnd.wap.wbmp
Some traditional emphasis elements are also supported, such as: Em,i,b,small,strong, and so on, as well as HTML. BR is also supported, but the writing is a little different, after all, XML, to write this
Finally, let's look at the time object and the OnTimer event, which holds the date until the card is invoked, and if we set the OnTimer event, then the OnTimer event is fired.
There are a lot of things I'm too lazy to write about, and I hope you don't have any impact on building WML pages.
The development problem of WAP
Unfortunately, things are not as simple as we think, and different WAP phones always have small, different places, just like m$ 's JavaScript is different from NS's. For example, the first WAP phone sold in Norway, such as NoKia 7710, does not support the Post method correctly.
Another limitation is the size of the deck problem. Some phones (Nokia 7110) do not support more than 1.4K of WML documents, WAP gateways can compress your WML documents into smaller binary formats, but you don't want miracles to happen. At this time is not only the Nokia 7110 support Dongdong can not show, some emphasis flag also was neglected, in addition fieldset flag also very easily ignored by it, is not very annoying!? Hey, when you are on the emulator to make very cool page, and then to the phone to see, hey, hit the phone is your first choice.
Although the Nokia Toolkit 1.2 emulator supports cookies, the first WAP phone is not supported, which means that you will say goodbye to your ASP, at least for a long time.
In the next section, we'll really do a Web site that combines WML with ASP.