function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
karthic sankar 9karthic 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
David Peterson 9David Peterson 9
<apex:page standardController="Account">
<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/)