Solved

JSP positioning

Posted on 2010-08-17
8
358 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
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
Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

 

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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Display current date,month,and year to JTextField 3 53
Set up Wildfly 10 8 393
best way to search/remove a file from an EAR file 3 107
runtime exception 2 27
Troubleshooting common task sequence error codes
Having trouble getting your hands on Dynamics 365 Field Service or Project Service trial? Worry No More!!!
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

776 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