...

View Full Version : closing button is not working in Firefox 3.0



adusumalli
09-04-2008, 11:14 PM
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 :


<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.



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..

rnd me
09-07-2008, 10:04 AM
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.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum