469,286 Members | 2,442 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,286 developers. It's quick & easy.

How call WMLscript function on wml Page load

6
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.org/DTD/wml_1.1.xml">
<wml>

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

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

</wml>


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

extern function HelloWML()
{
Dialogs.alert("Hello from HelloWML");
}
Mar 16 '08 #1
2 4330
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
Mar 17 '08 #2
bazm
6
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.
Mar 17 '08 #3

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

4 posts views Thread by faraz | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.