Click to See Complete Forum and Search --> : Closing Iframe opened by Picnik API


Dollarjunkie
10-13-2007, 01:21 PM
Hi,

I need to close Picnik IFrame when I am done editing in my site. I copied the code in the site but when I click on the close tab, nothing happens. and I do not understand what is wrong with my code here...

http://www.picnik.com/info/api


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >

<head>
<link href="../App_Themes/Beetledome/Beetledome_styles.css" rel="stylesheet" type="text/css" />
<title>Going back to Beetledomenow, please wait................ </title>
<!-- <meta http-equiv="refresh" content="5;url=www.Beetledome.com/User/MyPhoto.aspx" />-->
<script language="javascript" type="text/javascript">
function close() {
// Check to see if we are still in a frame
if (parent.frames.length > 0)
{
parent.onPicnikClose(); // Let the parent frame close the picnik in a box frame
} else {
document.location.replace('http://www.Beetledome.com/User/MyPhoto.aspx'); // Go back to your site
}
}
</script>
</head>
<body onload="close()">
</body>
</html>