On Tue, 14 Sep 2004 17:05:58 +0200, H�kon T S�nderland <[EMAIL PROTECTED]> wrote:
> Sorry for being a complete clueless newbie, but could you expand
> a bit on this? I don't have the concepts quite clear enough to
> understand what you mean.
>
> Thanks,
> H�kon
That's quite alright, no need to apoligize, I should have explained a
little more. We have a jsp page where a user clicks a submit button,
which calls the jsp page javascript method below, openNewBrowser.
This in turn opens a new window which is first directed to whatever
someReport.html contains. In our case it is a flash file, but it
could be anything. In the html file we do a submit on the load event.
Probably not the most elegant way of doing this, but it works. If
you need anymore explanation let me know.
******* Excerpt from jsp page *************
var reportWindow;
function openNewBrowser()
{
reportWindow = window.open("/someReport.html", "newWindow",
"width=700,height=500,resizable,toolbar,menubar,scrollbars");
}
******* End of excerpt from jsp page *************
******* Excerpt from html page *************
<script language="JavaScript">
<!--
function submitReport()
{
//window.opener.document.forms[0].submit(); //submits the report
window.opener.document.reportsForm.submit(); //submits the report
window.focus(); //bring the window to the top of the screen by setting
focus
var modalWidth = 700;
var modalHeight = 500;
var left = Math.round((screen.width - modalWidth) / 2); //x coordinate
var top = Math.round((screen.height - modalHeight) / 2); //y coordinate
window.moveTo(left, top); //moves the window to the center incase
they moved it off the screen
window.resizeTo(modalWidth, modalHeight);
}
//-->
</script>
</head>
<body onload="javascript:submitReport();">
Please wait...
</body>
******* End of Excerpt from html page *************
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]