I'm having problems using a wml script in my wml site, when I try to call a function the browser download the wmls file.
My server has all the mime types for wml
this is an example of my wml code embedded in php file
<?header("Content-type: text/vnd.wap.wml");?>
<?echo('<?xml version="1.0" encoding="UTF-8"?>');?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.2//EN" "http://www.wapforum.org/DTD/wml12.dtd">
<wml>
<card>
<p>
<b>WmlScript</b><br/>
<a href="wmlscriptfile.wmls#helloWorld()">Run WMLScript</a><br/>
$(message)
</p>
</card>
</wml>
this is the wmlscript code in wmls file
extern function helloWorld()
{
WMLBrowser.setVar("message", "Hello World. Welcome to our WMLScript tutorial.");
WMLBrowser.refresh();
}
I'm trying to insert the wmlscript in a php file changing the mime type in the header but the browser download the file again
<?header("Content-type: text/vnd.wap.wmlscript");?>