MIME types for WAP?

Hi,

I am testing to be able certain pages of one of my sites in my I mobile telephone, I assume that adding types MIME in the Control Panel such they worked, the test page is on Win Servers (IIS), and the MIME types adding on Control Panel is:

.wml text/vnd.wap.wml
.wmlc application/vnd.wap.wmlscript
.wmls text/vnd.wap.wmlscript
.wmlsc application/vnd.wap.wmlscriptc
.wbmp image/vnd.wap.wbmp

But profit not to see the page of test created in my mobile telephone, some ideas? ?(
 
Please use ".wmlc application/vnd.wap.wmlc" instead of ".wmlc application/vnd.wap.wmlscript". Could you please mention the extension of that test page?
 
Hi Prakash,

Thanks for your time.

Right now I will make the changes that you have commented to me and will prove again.

The extension of my test page is .asp, and the source code is:

<%
Response.ContentType = "text/vnd.wap.wml"

Function EnvioCorreo()
''some generic email script
End Function
%>
<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">
<wml>
<card id="mainCard">
<p align="left"><small><b>WAP Test</b></small></p>
<%
If Request.ServerVariables("REQUEST_METHOD") = "POST" Then
Response.Write EnvioCorreo()
Else
%>
<p align="left">name <input type="text" name="txtForm"></p>
<do type="accept" label="Submit!"><go href="<%=Request.ServerVariables("SCRIPT_NAME")%>" method="post">
<postfield name="txtForm" value="$txtForm"/></go>
</do>
<%End If%>
</card>
</wml>
 
Hi,

Finnaly the test page work on mi phone.

An error in the code was not letting see it, then re-post to let it in case somebody needs it, by the way, with post method ocurred, not recover the variable of the element of the form, I am investigating because :ranger:

<%
Response.ContentType = "text/vnd.wap.wml"

Function SomeFunction()
''some script
End Function
%>
<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">
<wml>
<card id="mainCard">
<p align="left"><small><b>WAP Test</b></small></p>
<%
If Request.ServerVariables("REQUEST_METHOD") = "POST" Then
Response.Write SomeFunction()
Else
%>
<p align="left">name <input type="text" name="txtForm"/></p>
<do type="accept" label="Submit!"><go href="<%=Request.ServerVariables("SCRIPT_NAME")%>" method="post">
</do>
<%End If%>
</card>
</wml>
 
Finally, so that the data of the form are not null, we must write the necessary WML <postfield> tags between WML tags <go> and </go> (one for each element on the form is assigned to him with the same name), so that when the page is sent such also they are sent not being these null data.

So much can be used method POST how GET in WML tag <go> (POST for request.forms and GET for request.querystrings, obvious)

On the other hand, some is no necessity to add MIME Types if it works with dynamic pages, writing in the head the type of content already is sufficient.


Final VBScript (ASP 3.0) Source Code:

PHP:
<%Response.ContentType = "text/vnd.wap.wml"%>
<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">
<wml>
<card id="mainCard">
<p align="left"><small><b>WAP Test</b></small></p>
<%
If Request.ServerVariables("REQUEST_METHOD") = "POST" Then
	Response.Write Request.Form("txtForm1") & "<br/>"
	Response.Write Request.Form("txtForm2") & "<br/>"
Else
%>
<p align="left">txtForm1 <input type="text" name="txtForm1"/></p>
<p align="left">txtForm2 <input type="text" name="txtForm2"/></p>
<do type="accept" label="Submit!">
	<go href="<%=Request.ServerVariables("SCRIPT_NAME")%>" method="post">
		<postfield name="txtForm1" value="$txtForm1" />
		<postfield name="txtForm2" value="$txtForm2" />
	</go>
</do>
<%End If%>
</card>
</wml>

I hope that this helps others :fencing:
 
Back
Top