Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

window.createPopup error

Status
Not open for further replies.
Apr 11, 2002
193
IN
Hi,

I am getting a error when i click on the button which is inside a DIV and the DIV is an innerhtml of the popup object. The error is top.Popup is null or not an object. Here is the code

var oPopup = window.createPopup();
function ShowErrorMsgBox(ErrMsg,MsgPosition)
{
// The popup object exposes the document property and all of the document
// properties.
var oPopBody = oPopup.document.body;
// Below the HTML that populates the popup is expressed as a string.
vContent='\
<div style="position:absolute; top:0px; left:0px;width:300px; padding:0px 0px 10px 0px; color:#000; font-family:tahoma; font-size:13pt;border:1px solid #5d8ab0;"> \
<div style="background: url(../App_Themes/Images/tp_nav_bgtile_btm.gif) -380px 0px repeat-y;color:#fff;padding: 4px;"><b>ADR Direct SM (Development)</b></div>\
<p style="background: url(../App_Themes/Images/tp_border.gif) top left repeat-x;margin:0px;padding: 4px;font-size:10pt;">'+ErrMsg+'</p>\
<p align="center"><input type="button" value="close" onclick="top.oPopup.hide();"></p>\
</div>';

oPopBody.innerHTML = vContent;

// This popup is displayed relative to the body of the document.
oPopup.show(450, MsgPosition, 340, 270, document.body);
}

Thanks,
Manish
 
Hi,

Forgot to mention that my page is in a frameset. If i run the page independently then there is no error. But if i call the page as a frame then i get the error.

Thanks,
Manish
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top