Ajax the Clear Cache

The first is: in the Ajax to add the URL parameters "? Fresh =" + Math.random (); / / Of course, here the parameters can be obtained fresh

The second: the parameters in the URL after "? Timestamp =" + new Date (). GetTime ();

Under way, response.flush () the problem could easily ~ ~ ~

code:
function officecode (officeid) (
oSelect = $ (officeid);
ajaxOfficeCode ( "medical.cmd? method = Initofficecode" + "& timestamp =" + new Date (). getTime ());
)

function ajaxOfficeCode (url) (

new Ajax.Request (url,
(
method: 'get',
onComplete: function (request) (
eval (request.responseText); / / implementation of some script
addOfficeOptions (medofficecode); / / medofficecode json variable
)
));

)

function addOfficeOptions (office) (
len = office.length; / / length

var o1 = document.createElement ( "OPTION");
o1.value = "";
o1.text = "";
oSelect.add (o1);
for (var i = 0; i <len; i + +) (
id = office [i]. officecode;
name = office [i]. officename;
var oOption = document.createElement ( "OPTION");
oOption.value = id;
oOption.text = name;
oSelect.add (oOption);
)
)
  • del.icio.us
  • StumbleUpon
  • Digg
  • TwitThis
  • Mixx
  • Technorati
  • Facebook
  • NewsVine
  • Reddit
  • Google
  • LinkedIn
  • YahooMyWeb

Related Posts of Ajax the Clear Cache

  • hibernate to use the principle of

    The use of hibernate, implementation of data persistence. Has the following several processes. One configuration database connection information. Hibernate.config 2 configuration mapping. 3 use: the use of the process are the following steps: 3.1: Ge ...

  • hibernate generic generic DAO

    hibernate generic generic DAO

  • can not be represented as java.sql.Timestamp

    Development of procedures for the use of hibernate when, some time there is no need to fill in the fields, but after the hibernate query time reported "Java.sql.SQLException: Value'0000-00-00 'can not be represented as java.sql.Timestamp ...

  • First Hibernate Example

    Curd a simple example. Source does not contain the dependent libraries, or playing too much of the package. PO object Note: One must have the default constructor 2 non-final modified. Otherwise useless lazy loading. UserDAOImpl category code, and oth ...

  • Struts2 + hibernate + spring problem user log in

    dao layer services layer action jsp <tr> <td align="center"> <b> user name: </ b> </ td> <td> <s: textfield name = "czyNumber" cssClass = "textstyle" theme = "simple" size = &q

  • Based on JDBC, JPA Annotation achieve simple CRUD Generic Dao

    The origin of ideas are pretty long history of reasons: [Use iBATIS history] The use of iBATIS has been a long time, the system is to use the CRUD template tool to generate the code, although there are tools to generate, but looked at a lot of CRUD the Sq

  • Hibernate secondary cache

    Hibernate cache: 2-bit cache, also known as process-level cache or SessionFactory level cache, secondary cache can be shared by all of the session Cache configuration and the use of: Will echcache.xml (the document code in hibernate package directory ...

  • Hibernate's lazy strategy

    hibernate Lazy strategy can be used in: <class> tag, it can be true / false Tags can <PROPERTY> values true / false type of necessary tools to enhance <set> <list> can tag values true / false / extra <many-to-one> <on ...

Leave a Reply

Recent
Recent Entries
Tag Cloud
Random Entries