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");
}
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");
}
Comment