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
johutchjohutch 

how to pass an agrument to a function in a controller/extension using javascript

hello all,

here's an example of my question:

in the controller i have some code:
Code:
public integer getAgeOfUser(boolean isUserOldPerson)
{
 //blah blah blah
return age; }

 now on the the visualforce page, you can reference controller functions using mergefields. so the function above (if it received no agruments) would be {!AgeOfUser}.  i want to use javascript variables and pass them to this function so the function can operate on the arguments and then return a result.

how would you accomplish this with mergefields and javascript?