I have a popup containing different div bodies that displays according to the pressed button. The function below works in IE7:
function openPopup(popupDiv){
$("#popupDiv div[id$=PopupDiv]").each(function (i)
{this.style.visibility='hidden';});
var div = document.getElementById(popupDiv);
if(div != null)
{div.style.visibility = 'visible';}
loadPopup();
}
But ideally, I would like to use a lot easier:
function openPopup(popupDiv){
$("div[id$=PopupDiv]").hide();
$(popupDiv).show();
loadPopup();
}
Which is good in Firefox and IE8, but does not work in IE7 (it works the first time it is called, but if the function calls, a pop-up window with a new container does not appear properly.
source
share