WebCab.de: First option

Home: WAPstacles: First option

First option

You have got an option list in your WML deck using the onpick attribute to automatically jump to the next card if an option will be selected. But if you want to select the first option in this list you cannot select it because it has already been selected by the WAP browser by default. You won't be able to go the first URL because you cannot de-select and re-select the first option. Solution: you need to set the attribute ivalue to 0 in the select element.

Wrong:

 1 <?xml version="1.0"?>
 2 <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">
 3 <wml>
 4 <card>
 5 <p>Some text
 6 <select>
 7 <option onpick="http://my.server.com/foo.wml">Foo</option>
 8 <option onpick="http://my.server.com/bar.wml">Bar</option>
 9 </select>
10 </p>
11 </card>
12 </wml>

Right:

 1 <?xml version="1.0"?>
 2 <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">
 3 <wml>
 4 <card>
 5 <p>Some text
 6 <select ivalue="0">
 7 <option onpick="http://my.server.com/foo.wml">Foo</option>
 8 <option onpick="http://my.server.com/bar.wml">Bar</option>
 9 </select>
10 </p>
11 </card>
12 </wml>

[ < Prev ] [ Next > ]

© 2000-2017 WebCab.de TM, Contact