hi.
i create a popupwindow which open 1 of my pages from my cakephp. This popup is a form which link to other page. Upon u click the 'Submit' button, it wil auto save the data to Mysql and close it.
I would like to close the popup window once the click submit button. i set top.close(); but stil no function.
What i mising..
<script type="text/javascript">
function popup(mylink, windowname){
if (! window.focus)return true;
var href;
if (typeof(mylink) == 'string')
href=mylink;
else
href=mylink.href;
window.open(href, windowname, 'width=800,height=1200,scrollbars=yes');
return false;
}
</script>
<p><A HREF="http://.../index.php/products/add" onClick="return popup(this, 'notes');top.close();">Add Products</A></p>