You need to sign in to do that
Don't have an account?
Hi i need to have help "I created VFpage and i return javascript like below but when am clicking on CANCEL and SAVE buttons it is not redirecting to Same record page
Hi i need to have help "I created VFpage and i return javascript like below but when am clicking on CANCEL and SAVE buttons it is not redirecting to Same record page.."
my script in VFpage:
<script language="JavaScript" type="text/javascript">
function CloseAndRefresh(){
window.opener.location.href="/{!$CurrentPage.parameters.OppId}";
window.top.close();
}
</script>
and buttons:
<apex:commandButton action="{!saveCurrentStep}" value="Save" oncomplete="javascript:CloseAndRefresh()" status="Status" />
<apex:commandButton action="{!CancelCurentStep}" value="Cancel" oncomplete="javascript:CloseAndRefresh()" />
So..here i need below methods need to be execute..so i need below entire code foe save and cancel..
public void SaveCurrentStep(){
}
and
public Void CancelCurentStep{
}
Is the Javascript keyword specifed intentionally in the below line ?
oncomplete="javascript:CloseAndRefresh()"