• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Refreshing only part of the screen in jsp

 
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
(instanceof Sidekick)
Posts: 8791
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
An alternative to AJAX would be a frame/iframe-based approach.
 
Sunitha Mudidani
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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!!
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
All of life is a contant education - Eleanor Roosevelt. Tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic