Solved

JSP positioning

Posted on 2010-08-17
8
363 Views
Last Modified: 2012-05-10
I have a jsp which has a button.

On click i open up a new independent jsp. How do i position it to place i require.

I know onload option calling js. But i dont want onload.

This should happen as soon as jsp is triggered before processing happens.

Any experts?
0
Comment
Question by:mahalasa
[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
8 Comments
 
LVL 3

Expert Comment

by:drcheap
ID: 33456224
See: http://www.pageresource.com/jscript/jwinopen.htm

Most notably the last section entitled "Set the Window Position"
0
 
LVL 3

Expert Comment

by:drcheap
ID: 33456246
Here is also a handy way to obtain the main window's size/position.  With that and a little math you can then position your popup window relative to the main window instead of at specific monitor coordinates.

http://javascript.about.com/od/guidesscriptindex/a/screen.htm
0
 

Author Comment

by:mahalasa
ID: 33456287
can resize sometimes lead to loss of data?  i see that sporadically it goes blank.
0
Independent Software Vendors: 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!

 

Author Comment

by:mahalasa
ID: 33456340
Hi drcheap...i have whole set of data to be passed to new jsp through js. How do i do it?
0
 

Author Comment

by:mahalasa
ID: 33456659
any experts on jsp?
0
 
LVL 20

Expert Comment

by:Sathish David Kumar N
ID: 33457968
sorry i didnt get your question clealy?
when u click button that timw new window or same window will open the new Jsp??
can you tell clearly?
0
 
LVL 10

Accepted Solution

by:
Hegemon earned 500 total points
ID: 33458518
Open the window and move it to where you want to be:

...

function f() {
   wnd = window.open (url, name, options);
   wnd.moveTo (123, 456);
}
..
<a href="" onclick="f()" />

0
 

Author Closing Comment

by:mahalasa
ID: 33913233
will check with these solutions
0

Featured Post

Independent Software Vendors: 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!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
caughtSpeeding java challenge 16 141
eclipse luna javeEE perspecive missing 5 122
struts spring hibernate example 12 143
throw exception 21 78
Had a business requirement to store the mobile number in an environmental variable. This is just a quick article on how this was done.
By reading this blog, MSPs will gain insight into how to improve communications with their clients as well as establish a more profitable business.

739 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