Link to home
Start Free TrialLog in
Avatar of GAUTAM
GAUTAMFlag for United States of America

asked on

Problem with invocation of a single instance of a jsp page

Hi experts...
Lets say that i have a link and when i click that link i go into that jsp page.
But when i click that link again another instance of that page is got when the previous page is already present.Now there a two instances of the same jsp page.
How can i restrict that link to invoke only a single instance of that jsp page???
Please help...
Avatar of Mick Barry
Mick Barry
Flag of Australia image

check that the a tag does not have a target attribute
if it does then remove it
if you actually want it to open a new window then give it a name instead
eg.  target="mywindow"
Check ur windows option . you will set as open in new window !
Avatar of GAUTAM

ASKER

@objects & @dravidnsr:Currently the jsp page is opeaned by the code
<a href="javascript:openInternalReports('defaultInternal.jsp');"></a>
I want the jsp page to be open in a anew jsp page but only a single instance of it.
Please help...
problem looks like its in your javascript
Avatar of GAUTAM

ASKER

@objects:
function openInternalReports( pLoc )
{
  window.open(pLoc, '_blank', 'height=800,width=900,resizable=1,menubar=0,toolbar=0');
}
This is my javascript function opeaning that jsp page.
Please help...
ASKER CERTIFIED SOLUTION
Avatar of Mick Barry
Mick Barry
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of GAUTAM

ASKER

@objects:It worked like a charm.Can you explain the solution.
Avatar of GAUTAM

ASKER

@objects:If any user clicks on it ifor the second time onwards without closing the previously opeaned page I need to display already opeaned.How do i do it???
Please help...
> If any user clicks on it ifor the second time onwards without closing the previously opeaned page I need to display already opeaned.How do i do it???

sorry, I don't understand what you mean
Avatar of GAUTAM

ASKER

If any user tries to open the jsp page even when an instance of the jsp page is already present
i.e If a user tries to open that jsp page without closing the previously opeaned page.
I need to display a message in an alert like already opeaned.
How do i do it...
Please help...
not sure you can easily.
What it will currently do is reload the opened page
Avatar of GAUTAM

ASKER

@objects:How to prevent it to reload and save the page contents as it is if any changes in the further locations take place.
It would be better if that page would not reload.
Please help...
not sure how you would achieve that