|
Tasks
Tasks order the computer to do certain things in a certain order
(for example; enter card, activate link).
Example:
<task "go/prev/refresh/noop">
The
go element
The go element makes jumps to other spots
possible. The target spot is declared within the "href" attribute. It doesn’t matter whether the
goal is a card or a different deck:
<go
href="http://www.1800freeshop.com">
</go>
<go href="#Cardname"> (NOTE: No
closing / if
</go> follows)
</go>
There must be a # before the card
name in the href-attribute if you put another card as a target
Links
to cards on other decks
If the target card is on another
deck, then put : "Deckname#Cardname"
CDATA
The special
CDATA element is for the case in which the programmer would
like to display text without paying attention to any other
WML-elements:
<![CDATA[This is a text
passage. Learn WML and WMLScript with the ccWAP WML
Crash-Course]]>
The
prev-element
Prev means previous and creates a jump to the
previous place or URL:
<prev/>
Refresh
Refresh will reload the URL:
<refresh/>
Noop
If you would like nothing to
happen you can use the noop command. This might ssem useless at
first, but soon you will notice that this is one of the most
useful tools of all:
<noop/>
The
do-element
The do-element can be used as a navigational
help. Do-elements are browser-dependent and will be displayed at a
certain position on the screen.
The do-element gives the user the
possibility to start a certain action on the displayed card. The
most important actions are:
Jump to previous page when activated:
<do
type="prev" title="Back">
<prev/>
</do>
Jump to main page when activated:
<do type="accept" title="Main">
<go href="index.wml"></go>
</do>
Jump to help when activated:
<do type="help" title="Help">
<go href="#help"></go>
</do>
A do-element can be defined within a card as well as outside of
the card.
Outside of the card you must enclose all do-elements within the
following tag:
<template>
<do...
</template>
Do’s defined in <template> will be displayed on all cards.
To display a do-elements only on single cards, you can simply
define it on that card.
If there should be defined another do-element in the
<template>, then it will be overwritten.
Label,
type and name
The attributes label, type and name are the most
important elements.
Label is the description for the element and can
also "accept",
"prev" or
"options".
name is only optional.
Here is an example:
<do type="accept"
name="WML1" label="C-Here!">
<go href="ccwap.wml"/>
</do>
Link
There are 2 kinds of links:
<anchor>
Please click here!
<go href="targetpage.wml"/>
</anchor>
<a
href="targetpage.wml">Please click here !</a>
targetpage.wml is the goal page of course.
If you would like to target a card with a link
you can put the following:
<anchor>
Please click here !
<go href="#Cardname"/>
</anchor>
<a href="#Cardname">Please click
here !</a>
Variables
Variables are important to the WML-language and
make it easier to design and create dynamic cards and decks. We
will not discuss this issue further now, because the subject would
be too specific.
Meta-Tags
The meta-tags are extremely important for search
engines and directories. Just like in HTML, the tags are in the
head of the file:
<head>
<meta name="keywords"
content="ccWAP, wml, WAP "/>
<meta name="description"
content="The basics of programming mathematics"/>
<meta name="author"
content="JohnDoe"/>
</head>
Title
Just like HTML-pages have a title, cards have one
in WML.
<card id="acard"
title="ccWAP Programming">
<p>
The ccWAP programming course has the following
features… etc. etc. .
</p>
</card>
Selection
boxes
Again,
this feature is very similar to HTML. In WML selection boxes are defined in the
following way:
<select>
<option
onpick="weather.wml">todays weather</option>
<option onpick="stocks.wml">stock
market</option>
</select>
The select-tag opens the selection box. Each
option-tag is one option in the box. Onpick is the target address,
from which the information is derived.
A precise description follows.
Other features such as manipulating the variables
are possible, but won’t be disscussed further in this beginners
course.
If you need some more information, you can
consult www.ccwap.com
or send an e-mail to wml@ccwap.com
MORE
Copyright ©
1999-2002 www.ccWAP.com All rights reserved
|