#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2005
    Posts
    13
    Rep Power
    0

    Arrow WML variables inside php smarty


    Code:
    //header..........
    <wml>
    
    <do type="accept" label="call" name="call">
     <go href="{if $(loc) eq 1 } {'wtai://wp/ap;4321;ganesh1'}  {else} wtai://wp/ap;{$selectedContact}  {/if}">
    </do>
    
    <select multiple="false" name="selectedContact" iname="loc" ivalue="1"  value="HTML">
        <option value="HTML">HTML Tutorial</option>
        <option value="XML">XML Tutorial</option>
        <option value="WML">WML Tutorial</option>
      </select>
    </wml>

    the above code shows select box with a default value. When i am in this page and do not select anything manually then default value of $(loc) is 1.
    but how do i use $(loc) inside the if condtion. the red color font $(loc) is the error.

    Above code is written using the smarty in a template file test.tpl

    How do i solve the error invalid tag $(loc) and use it inside the if condtion
    Reply With Quote
  2. #2
  3. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2010
    Posts
    17
    Rep Power
    0
    Originally Posted by ganesh_mak
    Code:
    //header..........
    <wml>
    
    <do type="accept" label="call" name="call">
     <go href="{if $(loc) eq 1 } {'wtai://wp/ap;4321;ganesh1'}  {else} wtai://wp/ap;{$selectedContact}  {/if}">
    </do>
    
    <select multiple="false" name="selectedContact" iname="loc" ivalue="1"  value="HTML">
        <option value="HTML">HTML Tutorial</option>
        <option value="XML">XML Tutorial</option>
        <option value="WML">WML Tutorial</option>
      </select>
    </wml>

    the above code shows select box with a default value. When i am in this page and do not select anything manually then default value of $(loc) is 1.
    but how do i use $(loc) inside the if condtion. the red color font $(loc) is the error.

    Above code is written using the smarty in a template file test.tpl

    How do i solve the error invalid tag $(loc) and use it inside the if condtion
    Reply With Quote
    use POST or GET. $(var) is only inside output.

IMN logo majestic logo threadwatch logo seochat tools logo