By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,377 Members | 1,655 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,377 IT Pros & Developers. It's quick & easy.

Problem with Firefox Popup and Frames

P: n/a
I run a dbms application that interfaces with the web. This module creates
a frames page with two frames ('main' and 'mwinfoframe'). All communication
with the dbms is routed through the 'mwinfoframe' (it's sort of hidden in
that it is assigned 1% (so I can view it in IE).

I'm having problems with Firefox working properly while both IE 6 and
Netscape v7.x work as expected. The following is additional information.

A list of reports is displayed in the main frame. The main frame starts
like:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<HTML>
<HEAD>
<TITLE>Customer Direct Access Menu</TITLE>
<META Http-Equiv="Cache-Control" Content="no-cache">
<META Http-Equiv="Pragma" Content="no-cache">
<META Http-Equiv="Expires" Content="0">

<BASE href="http://asibill/advantos/">

<LINK rel="stylesheet" href="styles/styles.css">
<SCRIPT language="JavaScript1.2" src="dwmain.js"></SCRIPT>
</HEAD>
..
..

When a user selects a report the request goes to the web server through the
mwinfoframe.

<A href="javascript:getHrefRedirect('myReport&myKey=a rhist')">
A/R History</A>

Several functions reside in a standard included javascript page and looks
like:

// Close popup window
function closePopUp() {
if (window.winPopUp && !window.winPopUp.closed) {
winPopUp.close();
}
}
// Close popup document
function closePopUpDocument() {
winPopUp.document.close();
}
// The following is used as a conduit to the dbms
function getHrefRedirect(dbmsScript) {
var myHREF = '/cgi-bin/dbmsscript.exe?myexec=' + dbmsScript ;
parent.mwinfoframe.location = myHREF;
}
// Open pop-up window
function openPopUp() {
if (!window.winPopUp || window.winPopUp.closed) {
winPopUp =
window.open('','mwQuery','width=575,height=400,too lbar=0,status=0');
}
}
// Manage winPopUp window
function writePopUp(TextLine) {
winPopUp.document.write(TextLine);

The script executes on the dbms and returns the following which runs in
'mwinfoframe' and creates a PopUp window like:

<HTML>
<META Http-Equiv="Cache-Control" Content="no-cache">
<META Http-Equiv="Pragma" Content="no-cache">
<META Http-Equiv="Expires" Content="0">

<HEAD></HEAD>

<SCRIPT LANGUAGE="JavaScript">
<!-- hide for non-supporting browsers

TextLine = '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01
Transitional//EN"\n'
TextLine += ' "http://www.w3.org/TR/html4/loose.dtd">\n'
TextLine += '<HTML>\n'
TextLine += '<HEAD>\n'
TextLine += ' <TITLE>Data Prompt</TITLE>\n'
TextLine += ' <BASE href="http://asibill/advantos/">\n'
TextLine += ' <LINK rel="stylesheet" href="styles/styles.css">\n'
TextLine += '</HEAD>\n'
TextLine += '<BODY bgcolor="#FFFFFF">\n'
TextLine += '<FORM Method="GET"\n'
TextLine += ' action="/cgi-bin/dbmsscript.exe"\n'
TextLine += ' NAME="mwReports"\n'
TextLine += ' TARGET="main">\n'
..
..
parent.main.openPopUp();
parent.main.writePopUp(TextLine);

TextLine = More Stuff
parent.main.writePopUp(TextLine);

TextLine = More Stuff
..
..
TextLine += '</FORM>\n'
TextLine += '</BODY>\n'
TextLine += '</HTML>\n'
parent.main.writePopUp(TextLine);

parent.main.closePopUpDocument();
// end of script hiding -->
</SCRIPT>
</HTML>

When the user selects a couple of report variables then clicks on the
[Submit]" button the report script will run and is supposed to return output
to the main frame. The main frame's <Body> tag looks like:

<BODY bgcolor="#FFFFFF"
text="#000000"
topmargin="0"
leftmargin="0"
marginheight="0"
marginwidth="0"
onLoad="MM_displayStatusMsg('');"
onUnload="javascript:closePopUp();">

and should close the PopUp window and the report should appear in the "main"
frame.

This works fine on IE 6 and all versions of Netscape through v7.2. However,
in Firefox, instead of the report returning to the "main" frame of the
parent page, it opens up a completely new page and fails to close the PopUp.
All subsequent activity within this module no longer functions properly as
we're now outside the frameset.

Any ideas if there's a configuration option in Firefox or I'm doing
something wrong?

Thanks,

Bill
Jul 23 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Maybe this, from the Firefox 0.9 release notes, helps:

"We have made some changes to fix security problems involving one site
targeting links and form submissions into a frameset created by another
site, however these changes may cause problems with some sites. If you
encounter problems where sites are trying to use this capability
legitimately and you need them to work, you can use about:config and
set docshell.frameloadcheck.disabled to true to disable the security
check. Please file bugs on the URLs that are problematic, if you
encounter any."

http://www.mozilla.org/products/fire...eases/0.9.html

To reach the setting, type "about:config" (without the quotes) in place
of a web address.
Jul 23 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.