+ 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?