The $ Character in WML

Preferences - Do not show ads

WML browsers treat all terms that begin with the $ character as variables. If you want to display the $ character, you should use $$. The following WML example demonstrates this:


(varEg2.wml)

<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.3//EN" "http://www.wapforum.org/DTD/wml13.dtd">

<wml>
  <card id="cell_phone_card" title="Buy Cell Phone">
    <p>
      The price of the cell phone in your shopping cart is $$200. Do you want to proceed to checkout now?<br/><br/>

      <a href="#checkout.wml">Yes. Proceed to checkout</a><br/>
      <a href="#product.wml">No. Continue shopping</a>
    </p>
  </card>
</wml>


The following screenshots show the result of the above WML example in some mobile phone browsers:



Sony Ericsson T610


Sony Ericsson T68i


Nokia Mobile Browser 4.0


Page 44 of 50 Previous Page | Next Page
Contents at a Glance
Print this Web Page | | Back to Top

Feedback Form (Expand)

What do you think about this web page?






WML Tutorial Table of Contents WML Tutorial Contents at a Glance Preferences - Change Color Scheme Preferences - Do Not Show Ads Previous Page Next Page