avarghese03
Programmer
Hi,
I have a jsp page where I load the results of a query from a database. Now that query takes time (about 30 secs). In the meantime, I want to display another page there with a message like "Please Wait..."
For eg., in the figure below, here's a page with three tabs: EMP, DEPT and CUST. So when user clicks on EMP, it shows employee information and clicking DEPT shows department information and so on... Now the tabs are Frame1 and the Page area is in Frame2.
Say the user has clicked on EMP and then would like to view CUST info. If the cust info query takes time, I want to display "please wait.." page. But when I do that in javascript, it does'nt work
------ -------- ---------
EMP | DEPT | CUST |
--------------------------------------------+
PAGE AREA |
________________________________|
My code (when the user clicks the tab) looks like this:
function tabClick(link,id)
{
parent.Frame2.location.href = 'Wait.html';
// the previous line does not work!!
var urlString = link+"?ID="+id;
if (urlString!="")
{
parent.Frame2.location.href = urlString;
}
}
Can anyone give me an idea of what I am doing wrong? I even tried to do a refresh but that causes more problems like it displays 'Wait.html' but it does not execute the subsequent commands!!!
function tabClick(link,id)
{
parent.Frame2.location.href = 'Wait.html';
parent.Frame2.location.refresh();
var urlString = link+"?ID="+id;
if (urlString!="")
{
parent.Frame2.location.href = urlString;
}
}
Any help is appreciated.
Thanks,
Al
I have a jsp page where I load the results of a query from a database. Now that query takes time (about 30 secs). In the meantime, I want to display another page there with a message like "Please Wait..."
For eg., in the figure below, here's a page with three tabs: EMP, DEPT and CUST. So when user clicks on EMP, it shows employee information and clicking DEPT shows department information and so on... Now the tabs are Frame1 and the Page area is in Frame2.
Say the user has clicked on EMP and then would like to view CUST info. If the cust info query takes time, I want to display "please wait.." page. But when I do that in javascript, it does'nt work
------ -------- ---------
EMP | DEPT | CUST |
--------------------------------------------+
PAGE AREA |
________________________________|
My code (when the user clicks the tab) looks like this:
function tabClick(link,id)
{
parent.Frame2.location.href = 'Wait.html';
// the previous line does not work!!
var urlString = link+"?ID="+id;
if (urlString!="")
{
parent.Frame2.location.href = urlString;
}
}
Can anyone give me an idea of what I am doing wrong? I even tried to do a refresh but that causes more problems like it displays 'Wait.html' but it does not execute the subsequent commands!!!
function tabClick(link,id)
{
parent.Frame2.location.href = 'Wait.html';
parent.Frame2.location.refresh();
var urlString = link+"?ID="+id;
if (urlString!="")
{
parent.Frame2.location.href = urlString;
}
}
Any help is appreciated.
Thanks,
Al