I have a main page, with a main controller, that contains some JavaScript code:
<apex:page controller = "controller1">
<script>
function function1(){
//I want to call the function 2 here
}
</script>
</apex:page1>
And a component with some JavaScript code too:
<apex:component controller="controller2">
<script>
function2(){ //Some code here }
</script>
</apex:component>
Well, I want to call the function 2, contained in the component, into my main page, like in the code above…
Is it possible? If yes, how?
The function2 in my component's JavaScript code refers to a method in my controller2, but I don't know if this information is useful for this problem.
Best Answer
We can access directly.
Component