Problem with Firefox Popup and Frames

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Bill H

    Problem with Firefox Popup and Frames

    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>Custom er 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="JavaS cript1.2" src="dwmain.js" ></SCRIPT>
    </HEAD>
    ..
    ..

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

    <A href="javascrip t:getHrefRedire ct('myReport&my Key=arhist')">
    A/R History</A>

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

    // Close popup window
    function closePopUp() {
    if (window.winPopU p && !window.winPopU p.closed) {
    winPopUp.close( );
    }
    }
    // Close popup document
    function closePopUpDocum ent() {
    winPopUp.docume nt.close();
    }
    // The following is used as a conduit to the dbms
    function getHrefRedirect (dbmsScript) {
    var myHREF = '/cgi-bin/dbmsscript.exe? myexec=' + dbmsScript ;
    parent.mwinfofr ame.location = myHREF;
    }
    // Open pop-up window
    function openPopUp() {
    if (!window.winPop Up || window.winPopUp .closed) {
    winPopUp =
    window.open('', 'mwQuery','widt h=575,height=40 0,toolbar=0,sta tus=0');
    }
    }
    // Manage winPopUp window
    function writePopUp(Text Line) {
    winPopUp.docume nt.write(TextLi ne);

    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="JavaS cript">
    <!-- 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="#FFFFF F">\n'
    TextLine += '<FORM Method="GET"\n'
    TextLine += ' action="/cgi-bin/dbmsscript.exe" \n'
    TextLine += ' NAME="mwReports "\n'
    TextLine += ' TARGET="main">\ n'
    ..
    ..
    parent.main.ope nPopUp();
    parent.main.wri tePopUp(TextLin e);

    TextLine = More Stuff
    parent.main.wri tePopUp(TextLin e);

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

    parent.main.clo sePopUpDocument ();
    // 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="#FFFFF F"
    text="#000000"
    topmargin="0"
    leftmargin="0"
    marginheight="0 "
    marginwidth="0"
    onLoad="MM_disp layStatusMsg('' );"
    onUnload="javas cript:closePopU p();">

    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


  • Paul R

    #2
    Re: Problem with Firefox Popup and Frames

    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.framel oadcheck.disabl ed to true to disable the security
    check. Please file bugs on the URLs that are problematic, if you
    encounter any."

    Mozilla’s family of products are all designed to keep you safer and smarter online


    To reach the setting, type "about:conf ig" (without the quotes) in place
    of a web address.

    Comment

    Working...