<script language="javascript">
function retrieveAndRefresh() {
value = document.formName.elementName.value;
window.opener.location.href = "someUrl.jsp?someParam=" + value;
}
</script>
this will refresh the bottom window and push the querystring parameter to it.
you'll have to find a way to keep any values which already exist in the bottom
window, though. i don't know if you can do this, but you could try to call a
function that exists in the bottom window to submit the form (with the newly
populated popup window value) and then redisplay with all values.
i've done what i wrote above, but haven't tried to call a function in an
opener. i would guess it'd be something like:
window.opener.someFunction(value);
in that function (located in the bottom window), you could call form.submit(),
which would populate your action form, but i'm just thinking out loud at this
point. hope this helps...
Antonio Lourinho wrote:
> Hi,
>
> I know this isn't an html nor javascript mailling list, but as i am using
> Struts at the moment here it goes anyway:
>
> i have a page (let's call it MainPage) which contains a form that�s
> submitted to a Struts action. One of it's fields is
> filled by opening a new browser window (javascript) that displays a list of
> possible values for that field. The problem
> is that after the field value is chosen, i am not being able of finding a
> way to refresh the MainPage view (with the new value) automatically. Does
> anybody know a way of doing this (besides having a refresh button in the
> MainPage)?
>
> Thanks in advance,
>
> Antonio - Portugal
>
> _____________________________________________________________________
> INTERNET MAIL FOOTER
> A presente mensagem pode conter informa��o considerada confidencial.
> Se o receptor desta mensagem n�o for o destinat�rio indicado, fica
> expressamente proibido de copiar ou endere�ar a mensagem a terceiros.
> Em tal situa��o, o receptor dever� destruir a presente mensagem e por
> gentileza informar o emissor de tal facto.
> ---------------------------------------------------------------------
> Privileged or confidential information may be contained in this
> message. If you are not the addressee indicated in this message, you
> may not copy or deliver this message to anyone. In such case, you
> should destroy this message and kindly notify the sender by reply
> email.
> ---------------------------------------------------------------------