You need to sign in to do that
Don't have an account?
Varun Annadata
This is my visual force page:
<apex:page standardcontroller="Program_Member_MVN__c" extensions="SkipMilestone" showHeader="false" sidebar="false">
<!-- <script language="JavaScript" type="text/javascript">
function CloseAndRefresh(){
window.opener.location.href="/{!$CurrentPage.parameters.id}";
window.close();
}
</script>-->
<apex:includeScript value="/support/console/40.0/integration.js"/>
<script type="text/javascript">
function Window(){
confirm("You are about to skip this patient to the. All open milestones previous to this one will be closed. Do you want to continue?");
}
function closeWindow(){
<!--var tabId = $CurrentPage.parameters.id;-->
var url = parent.location.href;
window.self.close();
}
<!--sforce.console.refreshPrimaryTabById(url,false);-->
</script>
<apex:form >
<apex:pageBlock title="Skip Milestone">
<apex:pageblocktable value="{!lst}" var="a">
<!--<apex:column ><apex:inputCheckbox value="{!a.selected}" /></apex:column>-->
<apex:column headervalue="MileStone" value="{!a.Pmm.Parent_Program_Stage__c}"/>
<apex:column headervalue="Stage" value="{!a.Pmm.Program_Stage_MVN__c}"/>
<!--<apex:column headervalue="Name" value="{!a.Pmm.Name}"/>
<apex:column headervalue="Status" value="{!a.Pmm.Status_MVN__c}"/>
<apex:column headervalue="Activity Sequence" value="{!a.Pmm.Activity_Sequence_Number_CTS__c }"/>
<apex:column headervalue="Id" value="{!a.Pmm.Id}"/>-->
<apex:column headerValue="Action">
<apex:commandLink value="Start" action="{!savemethid}" onclick="Window()" oncomplete="closeWindow()" styleClass="btn" style="text-decoration:none;padding:1px;">
<apex:param name="{!a.Pmm.Id}" value="{!a.Pmm.Id}" assignTo="{!paramValue}"/>
</apex:commandLink>
</apex:column>
</apex:pageblocktable>
</apex:pageBlock>
</apex:form>
</apex:page>
Is it possible to pass current stage name which i click into the confirm dialog?
is it possible to pass values to confirm dialog in javascript?
This is my visual force page:
<apex:page standardcontroller="Program_Member_MVN__c" extensions="SkipMilestone" showHeader="false" sidebar="false">
<!-- <script language="JavaScript" type="text/javascript">
function CloseAndRefresh(){
window.opener.location.href="/{!$CurrentPage.parameters.id}";
window.close();
}
</script>-->
<apex:includeScript value="/support/console/40.0/integration.js"/>
<script type="text/javascript">
function Window(){
confirm("You are about to skip this patient to the. All open milestones previous to this one will be closed. Do you want to continue?");
}
function closeWindow(){
<!--var tabId = $CurrentPage.parameters.id;-->
var url = parent.location.href;
window.self.close();
}
<!--sforce.console.refreshPrimaryTabById(url,false);-->
</script>
<apex:form >
<apex:pageBlock title="Skip Milestone">
<apex:pageblocktable value="{!lst}" var="a">
<!--<apex:column ><apex:inputCheckbox value="{!a.selected}" /></apex:column>-->
<apex:column headervalue="MileStone" value="{!a.Pmm.Parent_Program_Stage__c}"/>
<apex:column headervalue="Stage" value="{!a.Pmm.Program_Stage_MVN__c}"/>
<!--<apex:column headervalue="Name" value="{!a.Pmm.Name}"/>
<apex:column headervalue="Status" value="{!a.Pmm.Status_MVN__c}"/>
<apex:column headervalue="Activity Sequence" value="{!a.Pmm.Activity_Sequence_Number_CTS__c }"/>
<apex:column headervalue="Id" value="{!a.Pmm.Id}"/>-->
<apex:column headerValue="Action">
<apex:commandLink value="Start" action="{!savemethid}" onclick="Window()" oncomplete="closeWindow()" styleClass="btn" style="text-decoration:none;padding:1px;">
<apex:param name="{!a.Pmm.Id}" value="{!a.Pmm.Id}" assignTo="{!paramValue}"/>
</apex:commandLink>
</apex:column>
</apex:pageblocktable>
</apex:pageBlock>
</apex:form>
</apex:page>
Is it possible to pass current stage name which i click into the confirm dialog?
James Boggs
You can add any value you'd otherwise have access to in your JS just as you would in the body of the visualforce page, like var string = "{!$User.Name}";