Hi,

I will give a answer for your periodic request call.
you have to use the java script setTimeout() function and do the call periodically.

eg:-


<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
   pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd";>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title></title>


<script type="text/javascript">

function updateOrderList(){
   // write you XHP call here..

   setTimeout('updateOrderList()',5000);
}

</script>

<script>
    setTimeout('updateOrderList()',5000);
 </script>
</body>
</html>

when the pages loads, the scripts tag in the bottom of the pages fires the setTimeout method which would call the updateOrderList() function in 5000 mili seconds, and in the function you do your ajax call, after this also you call the you call the same method.. this would spawn a never ending loop until this page is goes out of the browser window.

Thanks,

Nuwan.




----- Original Message ----- From: "Peter Neu" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <user@struts.apache.org>
Sent: Friday, January 19, 2007 2:09 PM
Subject: Timed Java Script Request & Struts?


Hello,



in one of my endless attempts to fight the evil browser backward button
mechanism I was thinging about this:



Can I make a periodic java script (ajax)  request to determine when a user
hit the evil button and tries to work

a page that is not current anymore? Say the user hit the back button and now
resides on the "wrong" page

I make a hidden ajax request and determine he is in the wrong pace. Then I
give him a notice and send him back

to the right place.



Is this possible? How would I make the periodic request?



Cheers,

Pete










---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to