JSP positioning

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?
Who is Participating?
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()" />

See: http://www.pageresource.com/jscript/jwinopen.htm

Most notably the last section entitled "Set the Window Position"
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.

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

mahalasaAuthor Commented:
can resize sometimes lead to loss of data?  i see that sporadically it goes blank.
mahalasaAuthor Commented:
Hi drcheap...i have whole set of data to be passed to new jsp through js. How do i do it?
mahalasaAuthor Commented:
any experts on jsp?
Sathish David Kumar NArchitectCommented:
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?
mahalasaAuthor Commented:
will check with these solutions
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.