• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 769
  • Last Modified:

Window.Close Javascript in Firefox

Experts,

I have a rather interesting issue here...

My company has a yearly conference and produces proceedings after each conference which is disbursed on a  CD-Rom.  This year, we are including "mobile firefox" on the CD which will open in full screen mode with our index.htm page set as the home page in the firefox config file.

now the problem is, we have a close link and when we click it, nothing happens.  If I open the same page in IE the link works fine.

Any thoughts on how to overcome this obsticle? - has anyone experienced anything similar?

0
sailing42
Asked:
sailing42
1 Solution
 
phuocnhCommented:
Can you paste the source code (HTML) of index.html page here?
0
 
b0lsc0ttCommented:
sailing42,

Does other JavaScript code work?  This may seem obvious but has the version on the CD been set up with JavaScript disabled?

b0lsc0tt
0
 
sailing42Author Commented:
<html>
<head>
      <title>
            The ILA presents... The 2005 Amsterdam Conference Proceedings
      </title>
      <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
      <meta http-equiv="imagetoolbar" content="no">
      <meta http-equiv="Content-Style-Type" content="text/css">
      <meta name="copyright" content="Copyright (C) 2005 - International Leadership Association">
      <meta name="version" content="January 26, 2006 - 8:00pm">
      <meta name="author" content="MvK">
      <base target="ifrMain">
      <script type="text/javascript">
function CloseWindow()
{
window.close();
}
</script>
      <style type="text/css">
            .main {
                  height: 100%; width: 99.8%; position: absolute; top: 0; left: 0;
            }
            .fill {
                  height: 100%; width: 100%; background: none
            }
            
            body {
                  margin-left: 0px; margin-right: 0px;
                  margin-top: 0px; margin-bottom: 0px;
                  //color: rgb(38, 35, 92);
                  color: rgb(38, 35, 125);
                  font-family: "Trebuchet MS";
                  overflow: hidden;
            }
            
            div {
                  cursor: default;
            }
            
            .pointer {
                  cursor: pointer;
            }
            
            .bluelink {
                  text-decoration: none; color: rgb(38, 35, 92);
                  height: 13.3%;
            }
            
            
            .white {
                  color: rgb(255, 251, 240);
            }
            
            .white a {
                  color: rgb(255, 251, 240);
                  text-decoration: none;
            }
            
            .white a:hover {
                  color: rgb(150, 200, 70);
            }
            
            .white a:active {color: red}
            
            a:hover {text-decoration: underline; color: green}
            
            a:active {color: red}
            
            .white a.exitclass {
                  text-decoration: none;
            }
            
            .white a.exitclass:hover {
                  color: red;
            }
            
            
            .menu {
                  border: 2px solid rgb(255, 210, 100);
                  background-color: rgb(255, 225, 90);
                  padding-left: 8px;
                  padding-top: 2px;
                  color: white;
                  height: 100%;
                  cursor: default;
            }
            
            .menubox {
                  visibility: hidden;
                  cursor: default;
                  padding: 1px;
                  background-color: rgb(248, 144, 31);
            }
            
            .menubox td{
                  background-color: rgb(248, 144, 31);
                  border: 1px solid white;
                  text-indent: 7px;
                  font-family: "Tahoma", "Geneva";
                  font-variant: small-caps;
                  padding-top: 5px;
                  padding-bottom: 6px;
            }
            
            .menubox a{
                  color: white;
            }
            
            .menubox a:hover {
                  color: rgb(10,150,252);
            }
            
            
            body {
                  overflow: hidden;
            }
            
      </style>
      <script language="javascript" src="index.js" type="text/javascript">
      </script>
</head>
<body bgcolor="#c0c0c0" onload="start()" scroll="no" onscroll="scrollBack()" scrolling="no">
      <center>
            <iframe id="ifrMain" style="display: none; z-index: 10" name="ifrMain" src="reset.html" frameborder=0 marginwidth=0 marginheight=0 scrolling="auto" height=0 width=0 application="yes" onload="checkSrc()">
                  Your user agent does not support frames or is currently configured
                  not to display frames. This cd-rom requires frames in order to be fully functional.<br>
                  Please enable frames, or download a more suitable browser. This cd-rom will work with most recent browsers.<br><br>
                  However, Internet Explorer 6+ and Mozilla Firefox 1.5+ are preferred to enjoy all effects, please download one of them from:<br>
                  <a class="external" target="_blank" href="http://www.microsoft.com/ie">http://www.microsoft.com/ie/</a> or <a class="external" target="_blank" href="http://www.mozilla.com/firefox/">http://www.mozilla.com/firefox/</a>.
            </iframe>
      </center>
      
            <div style="position: absolute; width: 100px; height: 100px; z-index: 1" id="layer1">
&nbsp;</div>
      
            <span class="main" id="bgdiv" onmouseover="clearAll()">
                  <img id="bgimg" src="images/background.jpg" unselectable="on" width="0" height="0" alt="Hover your mouse over the words or phrases, and click on one of the links.">
            </span>
      <div style="display: none" id="security_hider"></div>
      <div id="security_help">
            <table border=0 cellpadding=20><tr><td>
            <h2 style="text-indent: 5px">Please read:</h2>
            <h3>Your browsers security settings may be preventing you from using this CD-ROM</h3>
            If this is the case, you may be seeing a bar like this on <b>the top</b> of your screen:<br>
            <img src="images/sp2restricted.png" border="1" alt="To help protect your security, Internet Explorer has restricted this file from showing active content that could access your computer. Click here for options...">
            <br><br>As this CD-ROM is harmless to your computer, you can safely tell your browsers to continue loading the CD-ROM. The exact method may vary per browser. In Internet Explorer you may do this as follows:
            <br><br><b>1. Click on the bar, and choose Allow Blocked Content...</b><br>
            <span style="width: 30px;">&nbsp;</span>
            <img src="images/sp2allow_blocked.png" border="1" alt="Allow Blocked Content..."><br>
            <br><b>2. Choose Yes to enable active content</b><br>
            <span style="width: 30px;">&nbsp;</span>
            <img src="images/sp2enable_active.png" border="1" alt="Security Warning: Are you sure you want to let this file run active content?"><br>
            <br><br>
            <h3>If this does not work your browser may not be suitable for using this CD-ROM.</h3>
            If this is the case, please download a more suitable browser. This CD-ROM will work with most recent browsers.<br><br>
            However, Internet Explorer 6+ and Mozilla Firefox 1.5+ are preferred to enjoy all effects, please download one of them from:<br>
                  <a class="external" target="_blank" href="http://www.microsoft.com/ie">http://www.microsoft.com/ie/</a> or <a class="external" target="_blank" href="http://www.mozilla.com/firefox/">http://www.mozilla.com/firefox/</a>.<br>
            <br><br><b>You may also check <a href="start.html">this page</a> for more information on how to get the CD-ROM working.</b>
            </td></tr></table>
      </div>
      <div id="security_filler"></div>
      <script language="Javascript" type="text/javascript">
            function getEl(id) {
                  return document.getElementById(id);
            }
            //function showSecurity() {
            getEl('security_hider').style.display = 'block';
            //getEl('security_hider').style.height = '8000px';
            getEl('security_filler').style.display = 'none';
            getEl('security_filler').style.height = '0px';
            //}
            //setTimeout("showSecurity()", 2000);
      </script>
      
      
      <div id="mainMenu">
            <img src="images/img1.jpg" id="klompen" alt="Dutch clogs, or wooden shoes" height=0 width=0 onmouseover="clearAll()">
            <img src="images/img2.jpg" id="chairs" alt="The Conference Chairs: Ted Baartmans & Jeffrey Beeson" height=0 width=0 onmouseover="clearAll()">
            <img src="images/img3.jpg" id="molen" alt="A windmill" height=0 width=0 onmouseover="clearAll()">
            <div id="txt_chairs" style="color: white; border: 0px solid rgb(175,175,175)"></div>
            
            <img id="rec1" src="images/trans.gif" border="no" onmouseover="doConf()" alt="" style="cursor: pointer">
            
            <img id="rec2" src="images/trans.gif" border="no" onmouseover="doPres()" alt="" style="cursor: pointer">
            <img id="rec3" src="images/trans.gif" border="no" onmouseover="doNeed()" alt="" style="cursor: pointer">
            
            <!-- <div id="menu_conf"> -->
                  <table width="100%" cellpadding=0 cellspacing=2 id="menu_conf" class="menubox">
                        <tr><td><a href="agenda.pdf" class="bluelink" onclick="showFrame();sideConf()">agenda</a> <img src="images/pdficon_small.gif" alt="PDF"></td></tr>
                        <tr><td style="text-indent: 1px; padding: 0px; font-size: 1px; border: none; background-color: rgb(255,200,35);">&nbsp;</td></tr>
                        <tr><td><a href="ILA-whoweare.html" class="bluelink" onclick="showFrame();sideConf()">the ila</a></td></tr>
                        <tr><td><a href="keynotes.html" class="bluelink" onclick="showFrame();sideConf()">the keynotes</a></td></tr>
                        <tr><td><a href="sponsors.html" class="bluelink" onclick="showFrame();sideConf()">sponsors</a></td></tr>
                        <tr><td style="text-indent: 1px; padding: 0px; font-size: 1px; border: none; background-color: rgb(255,200,35);">&nbsp;</td></tr>
                        <tr><td><a href="photos/index.html" class="bluelink" onclick="showFrame();sideConf()">the photos</a></td></tr>
                        <tr><td><a href="participants.pdf" class="bluelink" onclick="showFrame();sideConf()">participants</a> <img src="images/pdficon_small.gif" alt="PDF"></td></tr>
                  </table>
            <!-- </div>
            
            <div id="menu_pres" class="menubox"> -->
                  <table class="menubox" width="100%" cellpadding=0 cellspacing=2 id="menu_pres">
                        <tr><td style="text-indent: 1px;"><a href="programbook.pdf" class="bluelink" onclick="showFrame();sidePres()">program book</a> <img src="images/pdficon_small.gif" alt="PDF"></td></tr>
                        <tr><td style="text-indent: 1px; padding: 0px; font-size: 1px; border: none; background-color: rgb(255,200,35);">&nbsp;</td></tr>
                        <tr><td style="text-indent: 1px;"><a href="materials/index3664.html" class="bluelink" onclick="showFrame();sidePres()">presentations</a></td></tr>
                        <tr><td style="text-indent: 1px;"><a href="learninglabs.html" class="bluelink" onclick="showFrame();sidePres()">learning labs</a></td></tr>
                        <tr><td style="text-indent: 1px;"><a href="themesessions.html" class="bluelink" onclick="showFrame();sidePres()">theme sessions</a></td></tr>
                        <tr><td style="text-indent: 1px; padding: 0px; font-size: 1px; border: none; background-color: rgb(255,200,35);">&nbsp;</td></tr>
                        <tr><td style="text-indent: 1px;"><a href="findpaper.html" class="bluelink" onclick="showFrame();sidePres()">search by ...</a></td></tr>
                  </table>
            <!-- </div>
            
            <div id="menu_need" class="menubox"> -->
                  <table class="menubox" width="100%" cellpadding=0 cellspacing=2 id="menu_need">
                        <tr><td><a href="start.html" class="bluelink" onclick="showFrame();sideNeed()">let's start</a></td></tr>
                        <tr><td><a href="tutorial.html" class="bluelink" onclick="showFrame();sideNeed()">tutorial</a></td></tr>
                        <tr><td><a href="contact.html" class="bluelink" onclick="showFrame();sideNeed()">contact us</a></td></tr>
                  </table>
            <!-- </div> -->
      </div>
      
      
      <div id="txt_the" onmouseover="doConf()" style="cursor: pointer">the</div>
      <div id="txt_conference" onmouseover="doConf()" style="cursor: pointer">conference</div>
      <div id="txt_presentations" onmouseover="doPres()" style="cursor: pointer">presentations</div>
      <div id="txt_amp" onmouseover="doPres()" style="cursor: pointer">&amp;</div>
      <div id="txt_materials" onmouseover="doPres()" style="cursor: pointer">materials</div>
      <div id="txt_need" onmouseover="doNeed()" style="cursor: pointer">need</div>
      <div id="txt_a" onmouseover="doNeed()" style="cursor: pointer">a</div>
      <div id="txt_hand" onmouseover="doNeed()" style="cursor: pointer">hand</div>
      <div id="txt_question" onmouseover="doNeed()" style="cursor: pointer">?</div>
      
      <!-- <div id="status" style="border: 0px solid blue; width: 250; height: 10; position: absolute; top: 300; left: 100"></div> -->
      
      <div id="txt_title" style="letter-spacing: .4pt; font-variant: small-caps; cursor: default"><center><b><i>Emergent Models of Global Leadership</i></b></center></div>
      <div id="txt_chicago2"><center style="font-family: 'Verdana'; letter-spacing: 1.4px">November 2 - 6, 2005 Amsterdam, the Netherlands</center></div>
            
      
      
      <div class="white" style="z-index: 20">
            <a href="" id="txt_exit" target=_self onclick="closewindow()" class="exitclass">
                  <u>EXIT</u>&nbsp;&nbsp;&nbsp;x
                  <!-- <img id="img_exit" src="images/exit.jpg" border="no" onmouseover="status('exit2')" alt="EXIT" onclick="testMe()"> -->
                  <!--<img id="img_exit" src="images/trans.gif" border="no" onmouseover="status('exit2')" alt="EXIT" onclick="testMe()">-->
            </a>
            <!-- <a href="javascript: return false" id="close_x" onmouseover="status('exit')" onclick="testMe()" class="exitclass">X</div> -->
            
            <!--
            <a href="ILA-about.html" id="txt_about" onclick="showFrame()">About ILA</a><br>
            <a href="ILA-mission.html" id="txt_mission" onclick="showFrame()">The Mission</a><br>
            <a href="ILA-board.html" id="txt_board" onclick="showFrame()">The Board</a><br>
            <a href="ILA-staff.html" id="txt_staff" onclick="showFrame()">The Staff</a><br>
            <a href="ILA-members.html" id="txt_members" onclick="showFrame()">Our Members</a><br>
            <a href="ILA-newsletter.html" id="txt_newsletter" onclick="showFrame()">Newsletter</a><br>
            <a class="external" target="_blank" href="http://www.ila-net.org/" id="txt_join" onclick="showFrame()">Join us!</a><br> -->
            
            <img src="images/logo2.jpg" id="logo" alt="International Leadership Association" onmouseover="clearAll()">
            
            <a href="ILA-about.html" id="side1" onclick="showFrame();">About ILA</a><br>
            <a href="ILA-whoweare.html" id="side2" onclick="showFrame();">Who we are</a><br>
            <a href="members.pdf" id="side3" onclick="showFrame();">Our Members</a><br>
            <a href="ILA-newsletter.html" id="side4" onclick="showFrame();">The Newsletter</a><br>
            <a href="ILA-chicago.html" id="side5" onclick="showFrame();">Chicago '06</a><br>
            <a href="ILA-join.html" id="side6" onclick="showFrame();">Membership</a><br>
            <a href="contact.html" id="side7" onclick="showFrame()">Contact us</a><br>
            <a id="side8" onclick="showFrame()"></a><br>
            <a id="side9" onclick="showFrame()"></a><br>
            <a id="side10" onclick="showFrame()"></a><br>
            <a id="side11" onclick="showFrame()"></a><br>
            <!-- <div id="txt_nextconf">Next conference:</div> -->
            
            <div id="txt_chicago"><center style="color: rgb(250, 245, 208); font-family: 'Verdana'; letter-spacing: 1.4px">Proceedings from the 7th Annual Conference of the<br>International Leadership Association</center></div>
            
            <div id="txt_credits"><p>
            
            </div>
            
            <div id="txt_copyright"><p align="right">
            <a class="external" target="_blank" href="http://www.ila-net.org/" onclick="showFrame();">&copy; 2006 ILA<br>All rights reserved</a>
            <br>
            <a href="credits.html" style="top: 100px" onclick="showFrame();">> <u>CD & Photo Credits</u></a>
            </p></div>
            
      </div>
      
            
</body>
</html>
0
 
webizCommented:
Hi.
Your code is fine, it could be only because of permissions/settings in firefox.

Possible explanations:
1. Default installation does not install javascript support.
2. When running a file from a local drive (such as a cd drive), firefox doesn't allow to run javascript due to security measurements.

P.S. I haven't found "mozilla mobile" version, could you please post a link to it's official site?

Regards,
Daniel Engelman
0
 
rockiroadsCommented:
have u any javascript errors? bottom left icon I guess

anything which says "Scripts may not close windows that were not opened by script."

check this out  http://www.interwebby.com/blog/2006/02/04/3/
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now