This is a discussion on "dynamically refreshing webpage content" within the JavaScript Forum section. This forum, and the thread "dynamically refreshing webpage content are both part of the Program Your Website category.
|
|
|
|
|
![]() |
||
dynamically refreshing webpage content
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
|||
|
dynamically refreshing webpage content
hi guys
(obviously) I have a problem My webpage consists of different sectors. Each one is a separate JSP page. When I want to refresh a single sector, I use a javascript function, which issues a request to the controller servlet and the servlet returns the appropriate JSP page along with a Java object, containing information used in the JSP. The servlet code is something of the sort:
However, sometimes I need to change more than one <div> based on the information that I pass with the Java object sent by the servlet. A simple example: looking at the current(webforumz) page, let's say that the division on the right is advertisement.jsp. (As far as I understand) when I want to refresh it, I send a request to the servlet and it forwards the response to the advertisement.jsp and the result can be plugged from the JavaScript function into <div id=advertisement> BUT let's say I also want to change the <div id=welcome>Welcome, Pesho318i</div> with another content, which I also can get from the Java object that the servlet sends as a request. So, Ze question is how do I do that ??? Thank you in advance! Pesho |
|
|
|
|||
|
Re: dynamically refreshing webpage content
I think it would be easiest to refresh the entire page. Like this:
If this is not what you want, could you clarify. If anyone else has a suggestion or thinks my suggestion is deprecated, don't hesitate to post...
Last Blog Entry: Windows Vista vs. Mac Leopard (Nov 4th, 2007)
|
|
|||
|
Re: dynamically refreshing webpage content
thanks, but a full page refresh is not what I want. To solve the problem I will probably use two Ajax requests from my JavaScript function...
P. |
|
|||
|
Re: dynamically refreshing webpage content
That should work. Good luck, and if you have any problems, just ask...
Last Blog Entry: Windows Vista vs. Mac Leopard (Nov 4th, 2007)
|
![]() |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| [Solved] Web Site is Refreshing Too Much | spyke927 | Web Page Design | 7 | Mar 13th, 2008 20:21 |
| Changing URL without refreshing page ? | Perfection Studios | JavaScript Forum | 4 | Sep 14th, 2006 12:22 |
| refreshing webpages! | zillah_dee | Web Page Design | 2 | Jun 8th, 2006 18:48 |
| Problem with Screen Refreshing | Stumpy_uk | JavaScript Forum | 1 | Jan 10th, 2006 07:57 |
| Refreshing new changes... | Tim356 | Web Page Design | 2 | May 15th, 2005 01:21 |