Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Sep 2008
    Posts
    66
    Thanks
    18
    Thanked 0 Times in 0 Posts

    closing button is not working in Firefox 3.0

    Hi I have the layout on my JSP page. when i click on the page the layout will open. The layout has close button in the right side cornor. but that close button is not workint in Firefox 3.0.

    The layout code :
    Code:
       <div id="fcNewApptName" onclick=""
          style="visibility: hidden; overflow: none; position: absolute; border: 1px solid black; background-color: white; z-index: 9999;">
          <table border="0" cellspacing="0" style="padding: 0px;">
          <tbody>
            <tr>
              <td>  
                <table border="0" cellspacing="0" style="padding: 0px;">
                  <tbody>
                    <tr>
                      <td style="padding: 0px;">
                        <input type=text size=32 id=fcNewApptNameInput name=fcNewApptNameInput class=verySmall
                          style="border: 1px solid; padding: 0px; " value=""
                          onkeypress="handleKeyPressExecFunc(event, newApptSaveAndClose,null)"
                          onclick="disableNewApptOnClick=true;">
                      </td style="padding: 0px;">
                      <td class="verySmall" align="right" bgcolor="#ddddee" style="padding: 0px;">
                        <img src="graphics/ozIcon13Close.gif"
                          onclick="newApptCloseWithoutSaving()">
                      </td>
                    </tr>
                  </tbody>
                </table>
              </td>
            </tr>
            <tr>
             <td>
               <a href="#" style="margin-top: 0px; margin-left: 2px;" class=verySmallGrey2NL
                 onclick="newApptSaveAndEdit()">Edit
                 <img src="graphics/arrow_btn.gif" align=absmiddle border=0> </a>&nbsp;&nbsp;
               <a href="#" class=verySmallGrey2NL
                 onclick="newApptSaveAndForceClose()">Save and Close
                 <img src="graphics/arrow_btn.gif" align=absmiddle border=0></a>
             </td>
            </tr>
            <tr>
              <td class=verySmallGrey2NL onclick="disableNewApptOnClick=true;">
                <input id="fcQuickAddRemember" 
                  type="checkbox" <%= quickAddApptRemember ? "checked" : "" %> 
                  onclick="updateQuickAddRemember();">Always Open Edit Page
              </td>
            </tr>
         </tbody>
       </table>
    </div>
    This is the code for closing button.

    Code:
       function newAppointmentNameHideDiv()
      {
        if ( fcCalRefreshInProgress == 1 )
          return;
    
        // Save a pointer to the fcNewApptName div. 
        // The first time this function is called, fcNewApptNameHolder will be null, but the
        // div does exist in the document.  So a reference to the fcNewAppName element is stored
        // in it.  The fcNewAppName div is never destroyed, so the reference stored in 
        // fcNewApptNameHolder can be used after that.
        
        // Note:  There is a case in refreshFcApptView() where the content of the div is destroyed
        // with IE, so there a clone is made before the distruction and then is restored.
        
        obj = null;
        if (fcNewApptNameHolder == null) {
          fcNewApptNameHolder = document.getElementById('fcNewApptName');
          obj = fcNewApptNameHolder;
        }
        else {
          obj = fcNewApptNameHolder;
        }
        // document.getElementById('fcNewApptName').style.display = "none";
        
        // Hide it
        obj.style.visibility = 'hidden';
        obj.style.display = 'none';
    
        // remove it from the table cell
        obj.parentNode.removeChild(obj);
    
        // place it in a "holder"
        $('fcApptsMain').appendChild(obj);
      }
               
      
        /**
       * Just closes the input dialog. (div)
       */
      function newApptCloseWithoutSaving()
      {
        newAppointmentNameHideDiv();
      }
    what i need to update in the above code.

    Thanks in advance..

  • #2
    Senior Coder rnd me's Avatar
    Join Date
    Jun 2007
    Location
    Urbana
    Posts
    4,399
    Thanks
    11
    Thanked 595 Times in 575 Posts
    without seeing the apropos code, i can remind you that the ability of a script to close a window or tab is a user-preference.
    my site (updated 13/9/26)
    BROWSER STATS [% share] (2014/9/03) IE7:0.1, IE8:4.6, IE11:9.1, IE9:3.1, IE10:3.0, FF:17.2, CH:46, SF:11.4, NON-MOUSE:38%


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •