This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Struts and the fly likes Calling struts action with specified time interval using ajax Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Calling struts action with specified time interval using ajax" Watch "Calling struts action with specified time interval using ajax" New topic
Author

Calling struts action with specified time interval using ajax

nick angel
Ranch Hand

Joined: Dec 14, 2005
Posts: 39
Hello to everyone. The problem I am currently facing is the following. I have created a jsp where I wish to call a struts action using ajax. The pertinent code in my jsp is as follows:



What i wish to accomplish is to call the struts action at a specified time interval. However, the code i have written does not work. The struts action gets called a first time, but when the specified amount of time has elapsed then it just freezes.

I was hoping someon could point me in the right direction. Any help would be greatly appreciated.
Dom Lassy
Ranch Hand

Joined: May 05, 2006
Posts: 181
setTimeout only calls a function once.

setInterval will repeatedly call a function.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Calling struts action with specified time interval using ajax
 
Similar Threads
Javascript does not executed for Struts File
Problem accessing the form object of a different frame
Problem with Ajax autocomplete Tag
Spring display tab menu
prototype framework with ajax that is using struts 2 in jsp