• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

refreshing part of the JSP page without reload-kind of AJAX

 
sai kinnera
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have a main JSP for display of about 1000 records which is displayed fine
using a display table. I have another JSP included in this JSP which just gives the user a warning message (no of records also)using html:error tag.
<tr valign="top">
<td width="100%" colspan="5">
<div align="center">
<html:error/>
</div>
</td>
</tr>

For the 1000 records, I call the database once and for number of total records(generally>1000), I make another database call. As both the calls involve around 9 table joins, the page loading is taking a lot of time. I want to make 2 different actions for both the calls and refresh the message part after the page is loaded with the first query. I do not know if I can use AJAX for this. Can anybody help. Thanks in advance.
Sai Kinnera
 
Merrill Higginson
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You might try putting your error message in an <iframe>. That way you can refresh it separately from the main page.
 
Vicky Pandya
Ranch Hand
Posts: 148
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes. you can use AJAX to achieve this. Refresh partial page using <div> tag and AJAX JS functions. Should be very easy.
Originally posted by sai kinnera:
Hi,
I have a main JSP for display of about 1000 records which is displayed fine
using a display table. I have another JSP included in this JSP which just gives the user a warning message (no of records also)using html:error tag.
<tr valign="top">
<td width="100%" colspan="5">
<div align="center">
<html:error/>
</div>
</td>
</tr>

For the 1000 records, I call the database once and for number of total records(generally>1000), I make another database call. As both the calls involve around 9 table joins, the page loading is taking a lot of time. I want to make 2 different actions for both the calls and refresh the message part after the page is loaded with the first query. I do not know if I can use AJAX for this. Can anybody help. Thanks in advance.
Sai Kinnera
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic