How call WMLscript function on wml Page load

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • bazm
    New Member
    • Mar 2008
    • 6

    How call WMLscript function on wml Page load

    Hi All,

    I have just finished a website with Html/javascript and I'm now trying
    to create a similar website to work over WAP. Please can anybody help me
    negotiate a roadblock?? I hope it is just plain ignorance on my part(or dimness!).

    I need to do quite a bit of initialisation when a wml page is loaded so I need
    to call a function on page load. After some research my attempt is below.
    Either it does not work or the alert() in the wmlScript is failing. Or I'm just in a mess!

    I would be very grateful for any suggestions.


    MyTestWML.wml
    -------------------------

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

    <head>
    <script language="WmlSc ript" type="text/WmlScript" src="test.wmls" > </script>
    </head>

    <body onload="test.wm ls#HelloWML();" >
    <form >
    <textarea name="Text" id="TextBox" rows="10" cols="60"
    style="backgrou nd-color:mistyrose ; color:blue;">
    </textarea>
    </form>
    </body>

    </wml>


    test.wmls
    --------------

    extern function HelloWML()
    {
    Dialogs.alert(" Hello from HelloWML");
    }
  • rush2pooja
    New Member
    • Mar 2008
    • 3

    #2
    hi,

    u said u have made an html page....so retreiving the data from database and displaying it is done using jsp.....so how does the same thing apply to wap?
    how can u run jsp files in wap...?plz help

    Comment

    • bazm
      New Member
      • Mar 2008
      • 6

      #3
      Hi,

      If you read the post you'll see that I have just finished a website with Html/javascript - thats finished and working fine. Now I'm trying to develop a WAP website - other than the underlying logic they are unrelated.

      Comment

      Working...