You need to sign in to do that
Don't have an account?
Can JavaScript assign values to Apex Controller Variables?
Can JavaScript on a VisualForce page assign values to Apex Controller variables?
I have an outputpanel which calls a javascript funtion when clicked. Part of my app requires a variable to get a value when the outputpanel is clicked. I would use the actionsupport or param to assign the value to the variable, but this causes a page refresh or an ajax refresh, neither of which I want. What would be ideal is if the js function I call when clicking the outputpanel could input the value to the variable.
Is this possible, or is that what JavaScript Remoting in Spring11 all about?
Check out this post, it helped me when i was trying to do something similar. Passing javascript values to apex controller
Hope that helps.
All Answers
Check out this post, it helped me when i was trying to do something similar. Passing javascript values to apex controller
Hope that helps.
Jim:
Javascript Remoting for Apex Controllers requires that remotable Apex Controller methods are static, so controller instance variables are not accessible.