

Hi,Change your page2 code to this <apex:page controller="Accpopup2" showHeader="false" sidebar="false" id="the">
<apex:form id="page">
<apex:pageblock id="close">
<apex:pageBlockSection >
<apex:inputfield value="{!a.Name}"/>
<apex:inputfield value="{!a.Phone}"/>
</apex:pageBlockSection>
<apex:pageblockbuttons >
<apex:commandButton value="save" action="{!save}"/>
<apex:commandButton value="cancel" immediate="true" onclick="return closePopUp(true);" action="{!cancel}"/>
</apex:pageblockbuttons>
<apex:inputHidden id="pass" value="{!status}"/>
</apex:pageblock>
<script language="JavaScript" type="text/javascript">
closePopUp( false );
function closePopUp( closePopUpWin ) {
if( closePopUpWin || document.getElementById('the:page:close:pass').getAttribute('value') == 'true') {
window.top.close();
}
return false;
}
</script>
</apex:form>
</apex:page>
Change is that on Cancel button i made the immediate="true" onclick="return closePopUp(true);"
Which ignores required field validation on UI and closes the window.ThanksShashikant