在WAP网站上建立反馈表单

For any one person to create a web site and then think it is perfect, is ridiculous. It is important to
allow the visitors of our web sites to comment on what we have developed so that we can learn from the end-
user, our mistakes and not to mention the overall effectiveness. We create these facilities for web sites
so why not create them for our WAP sites.

A feedback form is developed by first creating the form, in this case to capture the end-user's comments,
and second to create the SendMail code, which will be used to send the comments via e-mail to us. As
always if you have any other problems with ASP/WML then you can e-mail me at michael_wright@lineone.net.
Also if you are a company supervisor, manager or director I am always looking for work, whether it be
working remotely or on-location. Please feel free to e-mail the same address.

First we create the feedback form itself. Please remember to change the red capital letters within the
code.

<% 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>

<!-- THIS IS THE FIRST CARD IN THE DECK -->

<card id="mainCard">

<p align="left"><small><b>Your Feedback</b></small></p>

<p align="left">Please enter your email address <input type="text" name="txtFrom" format="*M"/>

Please enter your feedback <input type="text" name="txtMessage" format="*M"/></p>

<do type="accept" label="Submit!"><go href="email.asp" method="post"><postfield name="txtFrom"
value="$txtFrom"/><postfield name="txtMessage" value="$txtMessage"/></go></do>

<p align="left"><small><a href="LOCATION OF YOUR MAIN WAP PAGE">Back</a></small></p>

</card>

</wml>

Now save that code as a file called feedback.asp. Then we must create the SendMail code. This SendMail
code can only be used if you have the ASPMail component installed on your web server. It is possible to
simply change the ASP code in conjunction with your own component e.g. CDONTS.

<% Response.ContentType = "text/vnd.wap.wml" %><?xml version="1.0"?>

<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">

<wml>

<card id="mainCard" title="Send Feedback">

<p><small><b>Your Feedback</b></small></p>

<%

sstrToName = "YOUR NAME"

sstrToAddr = "YOUR EMAIL ADDRESS"

Set Mailer = CreateObject("SMTPsvg.Mailer")

Mailer.RemoteHost = "SMTP MAIL SERVER"

Mailer.FromAddress = Request.Form("txtFrom")

Mailer.AddRecipient sstrToName, sstrToaddr

Mailer.Subject = "SUBJECT OF FEEDBACK EMAIL"

Mailer.BodyText = Request.Form("txtMessage")

If Mailer.SendMail Then

Response.Write "<p><small>Mail has been sent...</small></p>"

else

Response.Write "<p><small>Mail send failure. Error was " & Mailer.Response &"</small></p>"

end if

%>

<p align="left"><small><a href="LOCATION OF YOUR MAIN WAP PAGE">Back to Menu</a></small></p>

</card>

</wml>

Now save that code as a file called email.asp and you are ready to test it. I hope you found this article
helpful. One of the main problems I had when creating this code was the way in which the WAP input is
recognised by the ASP code i.e. You must either use Request.Form("txtFrom") or Request.QueryString
("txtFrom") and not just Request("txtForm").

时间: 2024-10-29 03:29:50

在WAP网站上建立反馈表单的相关文章

Dreamweaver MX进阶教程:制作反馈表单

dreamweaver|教程 本文介绍制作客户反馈表单的过程.主要内容是使用表格设计表单结构和设置form参数. 1.将插入点放在希望表单出现的位置.选择"插入">"表单",或选择"插入"栏上的"表单"类别,然后单击"表单"图标. 2.将插入点放在红色的表单中,单击"插入"栏"常用"类别中的"表格"按钮. 3.在"插入表格对话框中,

运用Dreamweaver制作反馈表单

本篇介绍使用表格设计表单结构和设置form参数. 1.将插入点放在希望表单出现的位置.选择"插入">"表单",或选择"插入"栏上的"表单"类别,然后单击"表单"图标. 2.将插入点放在红色的表单中,单击"插入"栏"常用"类别中的"表格"按钮. 3.在"插入表格对话框中,设置行数11,列数2. 4.在表格中,左边一列的单元格中输入文字

Dreamweaver轻松制作网页反馈表单

本文介绍制作客户反馈表单的过程.主要内容是使用表格设计表单结构和设置form参数. 1.将插入点放在希望表单出现的位置.选择"插入">"表单",或选择"插入"栏上的"表单"类别,然后单击"表单"图标. 2.将插入点放在红色的表单中,单击"插入"栏"常用"类别中的"表格"按钮. 3.在"插入表格对话框中,设置行数11,列数2. 4.在

原生JS封装ajax 传json,str,excel文件上传提交表单(推荐)_javascript技巧

由于项目中需要在提交ajax前设置header信息,jquery的ajax实现不了,我们自己封装几个常用的ajax方法. jQuery的ajax普通封装 var ajaxFn = function(uri, data, cb) { $.ajax({ url: uri, type: 'POST', dataType: 'json', data: data, }) .done(cb) .fail(function() { console.log("error"); }) .always(f

代码-AFNetworking 怎样上传数据? 怎样上传模拟表单

问题描述 AFNetworking 怎样上传数据? 怎样上传模拟表单 AFNetworking 怎样上传数据? 怎样上传模拟表单? 求大神代码提示 解决方案 和取数据差不多的 首先定义一个字典,用来存放参数 NSDictionary* params = [NSDictionary dictionary]; params[@"属性"] = 值; 上传字段数据: ** //创建请求管理类 AFHTTPRequestOperationManager* mgr = [AFHTTPRequest

前端-jersey框架下上传form表单出错

问题描述 jersey框架下上传form表单出错 前端form <form id="picForm" action="/intelligentStage-system-manage/rest/admin/addimage" method="post" enctype="multipart/form-data"> <label style="margin-top: 30px;">用户名

jsp+表单+sql-jsp中在页面上填写的表单信息,怎么保存到SQL数据库

问题描述 jsp中在页面上填写的表单信息,怎么保存到SQL数据库 我写了一个填写表单的界面,提交后,另一个页面的表格可以获取到相应的数据.但是,我不知道该怎么把 数据保存到数据库中.用了 String sql1 = "insert into LeaveList(country,profession,classes,studentId,name,contact,startdate,enddate,teacher) values ('"+country+"','"+pr

Ajax方式提交带文件上传的表单及隐藏iframe应用

一般的表单都是通过ajax方式提交,所以碰到带文件上传的表单就比较麻烦.基本原理就是在页面增加一个隐藏iframe,然后通过ajax提交除文件之外的表单数据,在表单数据提交成功之后的回调函数中,通过form单独提交文件,而这个提交文件的form的target就指向前述隐藏的iframe. html 代码 复制代码 代码如下: <html> <body> <form action="upload.jsp" id="form1" name=

Ajax方式提交带文件上传的表单及隐藏iframe应用_AJAX相关

一般的表单都是通过ajax方式提交,所以碰到带文件上传的表单就比较麻烦.基本原理就是在页面增加一个隐藏iframe,然后通过ajax提交除文件之外的表单数据,在表单数据提交成功之后的回调函数中,通过form单独提交文件,而这个提交文件的form的target就指向前述隐藏的iframe. html 代码 复制代码 代码如下: <html> <body> <form action="upload.jsp" id="form1" name=