This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Servlets and the fly likes How to open another browser window in a jsp Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "How to open another browser window in a jsp" Watch "How to open another browser window in a jsp" New topic
Author

How to open another browser window in a jsp

Neha Sharma
Ranch Hand

Joined: Jul 13, 2001
Posts: 126
Hi,
I have a requirement of opening another browser window when a press a button on my JSP. how can I achieve that. Also guide me how will I get the record selected value from that new session to my original JSP.
Thanks
Neha
sanjay yermalkar
Greenhorn

Joined: Sep 19, 2001
Posts: 23
As server cannot distinguish between different windows of the same browser, all windows share the session. So, there is no 'new' session.
You can write a simple javascript function for opening a new window. like this :
<script language="JavaScript">
function newWindow()
{
window.open("http://www.cnn.com");
}
</script>
Mike Curwen
Ranch Hand

Joined: Feb 20, 2001
Posts: 3695

or in plain html < a href="blah.jsp" target="top" >New Window < /a>
Neha Sharma
Ranch Hand

Joined: Jul 13, 2001
Posts: 126
Great!! thanks Mike and Sanjay
Neha
 
 
subject: How to open another browser window in a jsp
 
Similar Threads
Popup Question
How to hide Username Password in the browser
Hello Friends
sessiontimeout
how can i include a JSP in an HTML page?