Hi All,
I have a project based on WML/WMLScript and PHP (its to download content to mobiles). This is all new to me but I'm working hard!
I am having problems trying to set text in the below textarea element. I used GetElementById( ) in Javascript but I wonder how it is done with wmlScript? (or php will do).
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#SetSomeText( );" >
<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 SetSomeText()
{
// For JavaScript I would do ...
var obj = GetElementById( "TextBox");
obj.value = "my new text";
}
PS The attempt to call SetSomeText() may be wrong ... I have asked for help on this in another post.
Many thanks...
I have a project based on WML/WMLScript and PHP (its to download content to mobiles). This is all new to me but I'm working hard!
I am having problems trying to set text in the below textarea element. I used GetElementById( ) in Javascript but I wonder how it is done with wmlScript? (or php will do).
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#SetSomeText( );" >
<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 SetSomeText()
{
// For JavaScript I would do ...
var obj = GetElementById( "TextBox");
obj.value = "my new text";
}
PS The attempt to call SetSomeText() may be wrong ... I have asked for help on this in another post.
Many thanks...