Question

10
Replies
7083
Views
Close popover
Abhishek Anand (abhishekisanand)
Virtusa Consulting services pvt. Limited
Lead Consultant
Virtusa Consulting services pvt. Limited
IN
abhishekisanand Member since 2015 2 posts
Virtusa Consulting services pvt. Limited
Posted: April 26, 2016
Last activity: May 3, 2016
Closed

How to close current tab on click of submit in modal dialog?

I have a requirement in which I need to close the current tab on click of a button in the modal dialog.

the below script is working fine in Pega 6 version but does not work in Pega 7

function closeCurrentTab()

  {

  try{

  var confirmId2 = document.getElementById("ConfirmVoid");

  if(confirmId2.value!="Reject")

  {

  if(typeof(event)=="undefined")

  event=window.event;

  pega.u.d.doModalAction(pega.u.d.submitModalDlgParam,event);

  var activeTab=parent.pega.composite.container.tabDisplay.getCurrentTab();

  if(activeTab!=null){

  parent.pega.composite.container.tabDisplay.closeTab(activeTab);

  }

  }

  else{ pega.u.d.doModalAction(pega.u.d.submitModalDlgParam,event);

  }

  } catch(err){

  } }

Message was edited by: Lochan to add Category

User Experience
Moderation Team has archived post,
Close popover This thread is closed to future replies. Content and links will no longer be updated. If you have the same/similar Question, please write a new Question.