This is driving me crazy. On a form I have another button(other than
the main submit) that is supposed to open a popup window which will
display an Excel doc. I have some javascript which I'll show that
changes the form's target for the popup. The Action dispatch method
called returns excel (using JExcelAPI).

The problem I'm running into is using IE and the user decided not to
close this popup window that has Excel opened up in it. If the user
hits the 'preview' button again, my popup window complains with an
ugly error about now dispatch paramater provided. The dispatch param
is being set in the onclick that calls the popup:

onClick="this.form.dispatch.value='previewNotification';openPreview(this.form);

This same EXACT code will work fine with opening the popup without
returning Excel. In other words, even if the non-excel popup is left
open and you hit the preview button again, it'll populate the popup
window fine.

Any ideas what I could try or what could be going on? I'd even settle
for a new window opening each time which I tried but using a random
number for the target name and the popup window name.

function openPreview(form) {
 window.open('about:blank', 'popup',
'width=700,height=400,menuBar=yes,status=yes,resizable=yes,scrollbars=yes');

 form.target = 'popup';
 form.submit();
 form.target = "_top";
}

I've even tried..

theWindow = '';
function openPreview(form) {
 if (theWindow.closed) {
   theWindow = window.open('about:blank', 'popup',
'width=700,height=400,menuBar=yes,status=yes,resizable=yes,scrollbars=yes');
 }
 form.target = 'popup';
 form.submit();
 form.target = "_top";
}

--
Rick

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to