File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSP and the fly likes Page loading issue in Index page Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "Page loading issue in Index page" Watch "Page loading issue in Index page" New topic
Author

Page loading issue in Index page

Kannan BLR
Greenhorn

Joined: Mar 01, 2005
Posts: 10
Hi,

In Index.jsp, Iam retrieving the datas from Database & put them to combo box. taking more time to load the page because of retrieving those data from DB. that is problem now.

Code is,
<TD width="120" class="text">
<input type="radio" name="find" value="ip"/>Industry Partner
</TD>
<td width="200">
<select style="width:266px" class="text" name="ipopt">

<option value="">--Select One--</option>
<%

UserMaster um1=new UserMaster();
ArrayList a2=new ArrayList();
a2=um1.getIPCodes();

for(int i=0;i<a2.size();i++)
{
String ipcode=(String)a2.get(i);
Industry ip=new Industry();
ip=ip.getIPName(ipcode);

%>
<OPTION value="<%=ipcode%>">
<%=ip.getIname()%></OPTION>

<%}}%>
</select></td>

what is my question is, Data should fetch from DB when i click radio button else combo box should be showing only ---Select One---.
If it's happened, load performane is good.
Please give the suggestion to me.
Thanks,


Kannan.A<br />kannanmsc@sify.com
K Kiran Kumar
Ranch Hand

Joined: Jan 04, 2006
Posts: 109
You can call a javascript using onclick() or onchange() or selected() methods by passing some variable(like getFromDB=y). After calling your JS method, call the same page and check for the variable that you have set. Then you can connect to dbase...
Regards,
Kiran.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Page loading issue in Index page