Solved

New window in JSP

Posted on 2002-07-19
15
260 Views
Last Modified: 2010-04-01
Hi,

Scenario 1) I have a html page (say default.htm) which has some buttons on it. Onclick of the button, it opens a JSP in new window - works fine.

Scenario 2) My requirement wants to disable resize button on the default.htm. So, i created a new page (new.htm) which will be thrown by default.htm. This new.htm will have the same functionality as the previous page and will have the resize button disabled.

Now, when i try to open the JSP page by selecting the button, the JSP page is opening in the same window. Why is this opening in the same window? I actually want this to open in a separate window as it worked in scenario 1.

could someone help me out?

thanks,
joe
0
Comment
Question by:joesat
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 13
15 Comments
 
LVL 33

Expert Comment

by:knightEknight
ID: 7165351
I don't know what you mean by "resize button" ... but when you want to open a page in a new window, give it a different name.  The name is the second parameter below:

  var win1 = window.open("page1.jsp","win1");
  var win2 = window.open("page2.jsp","win2");

alternatively, you can do this using target:

  <A href="page1.jsp" target="win1">Win 1</a>
  <A href="page2.jsp" target="win2">Win 2</a>

0
 

Author Comment

by:joesat
ID: 7165365
There are 3 buttons in the right size top corner of the browser, right? I meant the middle button.

joe
0
 
LVL 33

Expert Comment

by:knightEknight
ID: 7165375
You cannot control that programmatically with client script.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 33

Expert Comment

by:knightEknight
ID: 7165380
but you can set your window parameters to the correct size, and then make sure the window always stays that size ... is that sufficient?
0
 
LVL 33

Expert Comment

by:knightEknight
ID: 7165389
var win1 = window.open("page1.jsp","win1","width=300,height=200,resizable=no");
 var win2 = window.open("page2.jsp","win2","width=300,height=200,resizable=no");

0
 
LVL 33

Expert Comment

by:knightEknight
ID: 7165395
hush my mouth ... it can be done:

var win1 = window.open("page1.jsp","win1",
                                     "width=300,height=200,resizable=no,menubar=no,titlebar=no,toolbar=no,location=no");
0
 
LVL 33

Expert Comment

by:knightEknight
ID: 7165461
let me know if that works for you.
0
 
LVL 33

Expert Comment

by:knightEknight
ID: 7169926
ping
0
 
LVL 33

Expert Comment

by:knightEknight
ID: 7172160
ping
0
 
LVL 33

Expert Comment

by:knightEknight
ID: 7174962
ping
0
 
LVL 33

Expert Comment

by:knightEknight
ID: 7246969
hello? did this help?
0
 
LVL 33

Expert Comment

by:knightEknight
ID: 7249652
:-/
0
 
LVL 33

Accepted Solution

by:
knightEknight earned 200 total points
ID: 7249728
var win1 = window.open("page1.jsp","win1",
                       "width=300,height=200,resizable=no,menubar=no,titlebar=no,toolbar=no,location=no");
0
 
LVL 92

Expert Comment

by:objects
ID: 7250343

Try setting your target to "_blank".
0
 
LVL 33

Expert Comment

by:knightEknight
ID: 7251786
only a B?  did you want something more?
0

Featured Post

[Webinar] How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes how to import Lotus Notes Contacts into Outlook 2016, 2013, 2010 and 2007 etc. with a few manual steps. You can easily export and migrate Lotus Notes contacts into Microsoft Outlook without having to use any third party tools.
The recent Petya-like ransomware attack served a big blow to hundreds of banks, corporations and government offices The Acronis blog takes a closer look at this damaging worm to see what’s behind it – and offers up tips on how you can safeguard your…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

630 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question