R
Raycaster
Using Struts, I have a form displayed for a user to edit values. Now
next to a text area, I have a label which is a link that opens a new
window that displays a grid of available values for the text box. The
user clicks on a value and the popup window closes and fills in the
parent window with the selected value. This all works fine, but I want
to do is open the popup window with a specific size ( using javascript,
you specify the width and height ). I am lost at how to do this.
Perhaps I am even doing this the wrong way, but I am not sure how else
to do this. I am hoping someone has some advice on this. Here is how I
do it:
On the edit form, I have the following link:
<a href="chainLookupAction.do" target="Chain">Chain Lookup</a>
As you can see I use the target parameter to open the popup in a new
browser. The chainLookupAction.do action retrieves the data from the
database and sends the List to the new jsp. To compensate for this, I
have this in the popup window:
<script>
self.resizeTo(400,600);
</script>
The only problem I have in all this, is the popup window opens up, but
it opens up full screen and then resizes to the correct size. The
resize of the window can be quite annoying to the user and so I was
trying to get the new window to open without resizing, I want it to
open already resized.
Anyway, I hope this makes sense. I appreciate any help. Thanks.
next to a text area, I have a label which is a link that opens a new
window that displays a grid of available values for the text box. The
user clicks on a value and the popup window closes and fills in the
parent window with the selected value. This all works fine, but I want
to do is open the popup window with a specific size ( using javascript,
you specify the width and height ). I am lost at how to do this.
Perhaps I am even doing this the wrong way, but I am not sure how else
to do this. I am hoping someone has some advice on this. Here is how I
do it:
On the edit form, I have the following link:
<a href="chainLookupAction.do" target="Chain">Chain Lookup</a>
As you can see I use the target parameter to open the popup in a new
browser. The chainLookupAction.do action retrieves the data from the
database and sends the List to the new jsp. To compensate for this, I
have this in the popup window:
<script>
self.resizeTo(400,600);
</script>
The only problem I have in all this, is the popup window opens up, but
it opens up full screen and then resizes to the correct size. The
resize of the window can be quite annoying to the user and so I was
trying to get the new window to open without resizing, I want it to
open already resized.
Anyway, I hope this makes sense. I appreciate any help. Thanks.