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
Joined: Jan 29, 2003
Posts: 8791
posted
0
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.
A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
Ulf Dittmer
Marshal
Joined: Mar 22, 2005
Posts: 35258
7
posted
0
An alternative to AJAX would be a frame/iframe-based approach.
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.