wap text box flush solution

2010-03-29  来源:本站原创  分类:Mobile  人气:220 

As the cell phone browser cache problems, we will find that changes in recording sites in the WAP is still time to enter information on a record, that is cached information, for example, modify the information, modify personal information. I found a lot of information on the Internet, if a ban proposed an increase in cache User code, the following

<meta http-equiv="Cache-Control" content="no-cache"/> <! - Prohibition of your browser to access the page content from the cache - "

<meta http-equiv="Expires" content="0"/>

<meta http-equiv="Pragma" content="no-cache"/>

However, the actual testing process is still useless.

After some thought, thought of a solution is to modify the record for each form inside such as name changes in different text boxes, you can. Does not matter, as the cache, and through this idea, the following JSP as an example to everyone in order to provide a simple explanation:

We are on the page generates a random number: String * 100 +100 )+"";

Set ID = request.QueryString ( "ID")

The name of the text box name is set to: name = "title <% = ID%>"

Presented at: <postfield name = "title" value = "$ title <% = ID %>"/>

So each change in, due to the form names are different, so it will read the new record, rather than the cached information!

Code is as follows:

<%@ page language="java" contentType="text/vnd.wap.wml; charset=GB2312"
        import="java.util.HashMap"
        import="com.kingtop.pfb.*"
%>
%><?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">
<wml>
<head>
  <meta http-equiv="Cache-Control" content="max-age=0" forua="true"/>
  <meta http-equiv="Cache-Control" content="no-cache"/>
</head>
<card title=" Join the e-coupon  ">
<%
String aa = (int)(Math.random()*100+100)+"";
String s___      = String.valueOf(System.currentTimeMillis());
String m = request.getParameter("m");
String code = request.getParameter("code");
EwmWapClient ewc = new EwmWapClient();
Object[] data = null;
if ( !"".equals(m))
{
        data = ewc.yhq_add_kc(m,code);
        int ret = Integer.parseInt((String)data[0]);
        String msg = (String)data[1];
        if ( ret == 0 )  {
                out.println("<a href=\"youhuiquan.jsp?m="+m+"&s___="+s___+"\"> Increasing success, go to the list  </a>");
        }else{
                out.println(msg);
        }
}
out.println("m="+m);
out.println("code="+code);
out.print("aa="+aa);
%>
<p align="left">
<fieldset title=" Join the e-coupon  ">
 Mobile phone number  :<input type="text" name="m<%=aa %>" size="12" format="*n" maxlength="11"/><br/>
 Digital code  :<input type="text" name="code<%=aa %>" size="13" format="*n" maxlength="12"/>
</fieldset>
<anchor title=" Mobile phone number  ">
<go method="post" href="<%=request.getRequestURI()%>?s___=<%=s___%>">
<postfield name="m" value="$(m<%=aa %>)"/>
<postfield name="code" value="$(code<%=aa %>)"/>
</go> Submit
</anchor>

<br/><br/><a href="index.jsp?s___=<%=s___%>"> Returns the  </a>
</p>
</card>
</wml>
相关文章
  • wap text box flush solution 2010-03-29

    As the cell phone browser cache problems, we will find that changes in recording sites in the WAP is still time to enter information on a record, that is cached information, for example, modify the information, modify personal information. I found a

  • wap text box cache clear solution 2010-03-18

    As the cell phone browser cache, we will modify the records found in the WAP point into a record when the information is still on, that is, cache information, for example, modify the information, modify personal information. I found a lot of informat

  • Java Swing text box to enter the Chinese pop-up input window solution 2009-07-02

    java Swing inside the text box will pop up when you enter an "input window", the window people look unhappy, and there are a few bug: 1. In some versions of the jvm, there is a lot of layers of the modal dialog box when the top is using a modal

  • Text box background section shows 2010-05-03

    Text box background sub-display function was not used in a lot of web development. I've seen only in some online banks enter the bank card number, when there was an effect. Enter 4-digit figures, followed by 4 digits into the background of gray, then

  • Add a hyperlink in the text box 2010-05-31

    Problem I would like to join the hyperlink in the text box Solution <br /> tags using HTML <a href> htmlText property to set the text box can also be used TextFormat object property url <br /> Discussed two methods that are a prerequisit

  • JAVA GUI in a text box (JTextField) to monitor changes in the text box 2010-10-29

    As a cross-platform programming solution, Java is clearly not like the Delphi, as the user interface design to provide powerful, intuitive and efficient design support. For example, a text box control, when we perceived in the program if the user cha

  • Click the text box displays the time the drop-down list Data.js 2009-09-09

    1, the introduction of Date.js documents: <script language="javascript" src="images/Date.js"> </ script> 2, in the input text box of time to write on the onfocus (setday (this)) events <td> <input type="text&q

  • EXT join in the text box icon 2010-03-17

    EXT join in the text box icon. Define css: Js code. Login (background-image: url (/ ExtDwrJson / images / login_user.gif)! Important; background-repeat: no-repeat; background-position: right;). Password (background-image: url ( / ExtDwrJson / images

  • Javascript control the text box can only import figures 2008-05-21

    Javascript control the text box can only import figures <input onkeypress="return event.keyCode>=48&&event.keyCode<=57||event.keyCode==46" onpaste="return !clipboardData.getData('text').match(/\D/)" ondragenter="r

  • javascript input text box to limit the type of 2009-02-07

    javascript input text box to limit the type of The regular, we used to write some code to the function, Now I come to you as a reference: <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"&

  • js switch text box read-only and writable dynamic switching 2010-03-21

    Sometimes pages need to temporarily switch the text box read-only or writable, and sometimes we can use simple control can be disabled, but disabled the controls after controlling for the value can not be transmitted to the server, in the realization

  • Front text box data and import and export EXCEL 2010-03-31

    Main points to achieve two functions: (text box on a piece of the picture simply are no rules, but in the same column or peers, the size of different lengths) 1. The reception of all designated areas to export into a text box the value of the EXCEL t

  • Commonly used in javascript based on regular expression text box validation code 2010-03-31

    1, can not be empty <input type="text""if(this.value.replace(/^ +| +$/g,'')=='')alert(' Cannot be empty !')"> 2 can only enter the English and the number <input"if(/[^0-9a-zA-Z]/g.test(value))alert(' There is wrong ')&quo

  • ExtJs for the text box value in several ways 2010-03-27

    1, Html text box, such as: <input type="text" name="test"> Way to obtain the value: var tValue = Ext.getDom ('test'). value; Or var tValue = document.getElementById ('test'). value 2, ExtJs components such as: ( id: 'test', xtype

  • Commonly used javascript regular expression based validation code text box 2010-03-31

    1, can not be empty <input type="text""if(this.value.replace(/^ +| +$/g,'')=='')alert(' Cannot be empty !')"> 2, can only enter numbers in English and <input"if(/[^0-9a-zA-Z]/g.test(value))alert(' There is wrong ')"&

  • form form Enter only one text box to submit the question form. (address) 2010-04-17

    Writing project today, only one form text box and several text field. However, a carriage return in the text box on the submission form, feeling puzzled. So the whole search Submit keywords and keyword keyCode = 13, found it again there's no results.

  • Single text box to submit [change] 2010-04-17

    Writing project today, only one form text box and several text field. However, a carriage return in the text box on the submission form, feeling puzzled. So the whole search Submit keywords and keyword keyCode = 13, found it again there's no results.

  • Display and hide the text box 2010-04-30

    <! DOCTYPE html PUBLIC "- / / W3C / / DTD XHTML 1.0 Transitional / / EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv=&quo

  • How to java in the property values displayed in the text box? 2010-05-01

    Recently wrote a page, a text box to display the property value I know java can <s:property> get java to java, but property values property values displayed in the text box, by <s:textfield name="pageTo" cssStyle="width:16px; heigh

  • Several static methods of the user edit text box 2010-05-04

    To make this box can not edit, we can use several methods to solve the following ideas: The contents of the text box is only used to display and allow users to freely edit the time is necessary. Steps: Method 1: Set <input> tag readonly attribute tr