You need to sign in to do that
Don't have an account?
karthic sankar 9
how to call a apex method from controller using javascript
Hi Experts,
I have a below VF page.
<apex:page controller="ViewQAAMController">
<apex:form >
<apex:pageBlock >
<apex:pageBlockTable value="{!BadgeList}" var="data" align="center">
<apex:column value="{!data['Week__c']}"/>
</apex:pageBlockTable>
<apex:pageBlockTable value="{!BadgeList}" var="data" align="center" styleClass="table table-striped" >
<apex:column headerValue="MyValues">
<apex:outputLink value="{!data['Week__c']}" onclick="openWindow()">{!data['Week__c']}</apex:outputLink>
</apex:column>
</apex:pageBlockTable>
</apex:pageBlock>
</apex:form>
<script>
function openWindow(){
window.open('/apex/AddQAAMWeeklyPlanner');
}
</script>
</apex:page>
when the execution enters the JavaScript, I want to call a method from controller named, populateValues(), how to achieve that.?
Thanks and Regards
Karthic Sankar V P
I have a below VF page.
<apex:page controller="ViewQAAMController">
<apex:form >
<apex:pageBlock >
<apex:pageBlockTable value="{!BadgeList}" var="data" align="center">
<apex:column value="{!data['Week__c']}"/>
</apex:pageBlockTable>
<apex:pageBlockTable value="{!BadgeList}" var="data" align="center" styleClass="table table-striped" >
<apex:column headerValue="MyValues">
<apex:outputLink value="{!data['Week__c']}" onclick="openWindow()">{!data['Week__c']}</apex:outputLink>
</apex:column>
</apex:pageBlockTable>
</apex:pageBlock>
</apex:form>
<script>
function openWindow(){
window.open('/apex/AddQAAMWeeklyPlanner');
}
</script>
</apex:page>
when the execution enters the JavaScript, I want to call a method from controller named, populateValues(), how to achieve that.?
Thanks and Regards
Karthic Sankar V P
<script>
/* Here i need to call a controller class with out any onclick event. It should load by itselef */
</script>
</apex:page>
mykfcexperience (https://www.thedailygrind.net/tellmurphyusa/)