36 Chapter 3: WAP Using Cold Fusion: A Project Code description ♦ Line 1 is used for indicating the content type being sent to the browser. ♦ Lines 2 – 6 are employed when you need to define and execute a query to search for the record in the database containing the DSN name as prototype for the given userid. ♦ Line 7 defines the WML prolog. ♦ Line 11 defines the meta tag used by the browser. ♦ Line 15 – In the first card, if condition is applied to check the number of records passed through the query specified in Line 2.
All Rights Reserved 1. extern function Func1(Price){ // declaration of function funcl 2. var ITEM="0"; // declaring a new ITEM variable and setting to 0 3. getVar("TotalAmount"); // declaring a new TAmount variable and setting it to // the value of variable TotalAmount 4. prompt("Enter Quantity", ITEM); // declaring a dialog to take input from user 5. parseFloat(Price); // declaring a new Amount variable and setting it to Price 6. TAmount = TAmount + Amount; // adding amount to TAmount 7. refresh(); // refresh the browser 8.
All Rights Reserved 1. > 2. -- WML prolog–declaration of file type and version> 3. -- declaration of a new deck> 4.
5. -- meta tag to define the content and cache settings > 6. 7. -- declaration of a new card> 8. -- declaration of a new event> 9. -- refreshing the variables> 10. -- declaring a variable and setting the initial value> 11. -- end of refresh> 12. -- end of event declaration> 13. -- declaration of action event> 14. -- script file with a parameter> 15. -- end of action tag> 16.WAP, Bluetooth, and 3G Programming: Cracking the Code by Dreamtech Software Team
by Robert
4.3