This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Refreshing only part of the screen in jsp

 
Sunitha Mudidani
Greenhorn
Posts: 28
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am working on an app which has the following requirements

The info on the page is divided into sections and display only. To update the info on the sections we will have popup windows and when saved, only this section on the main page gets refreshed. But in few cases more than one section needs to be refreshed.

1) Using Ajax allows to refresh only that section? Shd each section be implemented as frames ? I have no idea on ajax.

2) Is it possible to refresh more than one section(not the entire page) based on the changes in one section?

3) The app uses struts framework. Pls point to the relevant examples and resources.

Thanks
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There are a few choices. Without AJAX, you can use JavaScript to set the location attribute of an IFrame, or two or three of them. That will issue a GET request to the server.

With AJAX, your JavaScript makes an invisible asynchronous call to the server and when the response comes back your script modifies the HTML DOM in the browser and the changes appear without refreshing the whole page. It's pretty magical, but not simple. See if the Prototype library Introduction to AJAX gives you enough info to decide if you want to pursue it.

Let us know what you think.

This discussion probably ought to move to an HTML forum or something.
 
Ulf Dittmer
Rancher
Pie
Posts: 42966
73
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
An alternative to AJAX would be a frame/iframe-based approach.
 
Sunitha Mudidani
Greenhorn
Posts: 28
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the replies.. had gone through ajax (an overview).. not sure how complex it will be to implement unless i try to run some examples. I need to try the frame approach as well. but can you point to some j2ee examples using any of the above so that i can start right away.

Thanks a lot!!
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64190
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please take the time to choose the correct forum for your posts. This forum is for questions on Java.

This post has been moved to a more appropriate forum.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic