CariDotMy

 Forgot password?
 Register

ADVERTISEMENT

View: 1891|Reply: 0

wml + wmls script...

[Copy link]
Post time 26-9-2006 01:06 PM | Show all posts |Read mode
aku nak wat simple calculation utk wap kuiz...just tambah result1,2,3,4,5 and display kat user phone. pakai wml script...function lain dah settle..tggal nak calculate je.. dah banyak kali try nie. hope somebody here bleh tlg.

welcome.wml

<!--View result-->
        <card id="check" title="CheckResult">
    <do type="accept" label="Home">
        <go href="#loggedin"/>
        </do>
        <p>
        <b>Hello, $user!</b><br/>
        Your Result is :</br>
        <!--Result display in table format-->
    <table border="1" align="center" columns ="2">
        <tr>
        <td><b>Number of Question</b></td>
        <td><b>Points</b></td>
        </tr>
       
        <tr>
        <td>Question 1</td>
        <td>$(result1)</td>
        </tr>
       
        <tr>
        <td>Question 2</td>
        <td>$(result2)</td>
        </tr>
       
        <tr>
        <td>Question 3</td>
        <td>$(result3)</td>
        </tr>
       
        <tr>
        <td>Question 4</td>
        <td>$(result4)</td>
        </tr>
       
        <tr>
        <td>Question 5</td>
        <td>$(result4)</td>
        </tr>
        </table>

        <do type="button" label="Total Point">
        <go href="WMLScript.wmls#addittion($(result1),$(result2),$(result3),$(result4),$(result5)">
        </do>
    </p>
        </card>       

        <card id="total" title="total point">
        <do type="accept" label="Check Result">
        <go href="#check"/>
        </do>
        <p>
        Total point is :
        </p>

WMLScript.wmls

extern function addition (result1,result2,result3,result4,result5)
{
               
        WMLBrowser.setVar("Total Point is:",result1+result2+result3+result4+result5);
        WMLBrowser.go("welcome.wml#point");

}
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

 

ADVERTISEMENT


Forum Hot Topic

 

ADVERTISEMENT


 


ADVERTISEMENT
Follow Us

ADVERTISEMENT


Mobile|Archiver|Mobile*default|About Us|CariDotMy

28-12-2024 10:06 PM GMT+8 , Processed in 0.138920 second(s), 13 queries , Gzip On, Redis On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

Quick Reply To Top Return to the list