×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    May 2003
    Posts
    5

    simple wml script does not work

    hi.

    obviously, something on my wap site does not work propperly.
    below is the wml and wmls file.

    everytime, i enter this site and enter the password, the phone does not execute the script, instead, it shows me the wmls code on the display.
    when i press the send button again, the script works.
    consequently, i have to fill out the form twice. just at the second time, it works.
    is it a mistake within the script, or is there a misconfiguration on the server?

    thanx a lot:

    b2

    ------------------------------------
    the scripts:

    wml:

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

    <wml>

    <card title="boredom.two media">
    <p><small>this area is available only for registered users.</small><br/><br/>
    please make sure, that this device can display .jpg files!<br/>
    <br/>please enter password</small><br/>
    <input name="pw" type="password"/>
    <a href="check.wmls#login('$(pw)')">enter</a><br/><br/>
    </p>
    </card>

    </wml>



    --------------------------------------------
    wmls:


    extern function login(pw) {
    if(pw=="sonicstage") WMLBrowser.go("data_images_select_user.wml");
    else Dialogs.alert("access denied. password incorrect.");
    }

  2. #2
    Regular Contributor
    Join Date
    Mar 2003
    Posts
    466
    Hi,

    I modified the WML code a bit and managed to get this work with Nokia 3510 Content Authoring SDK. Please try the following code and if it still not works, let us know. Which device or simulator are you using?

    Kind regards,
    Satu/Forum Nokia Developer Support

    --wml--

    <?xml version="1.0" encoding="utf-8"?>
    <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.3//EN"
    "http://www.wapforum.org/DTD/wml13.dtd">
    <wml>
    <card id="card1" title="Card #1">
    <p align="center">
    <small>this area is available only for registered users.</small><br/><br/>
    please make sure, that this device can display .jpg files!<br/>
    <br/>please enter password<br/>
    <input name="pw" type="password"/>
    <do type="accept" label="Enter">
    <go href="check.wmls#login('$(pw)')"/>
    </do>
    </p>
    </card>
    </wml>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×