+ Start a Discussion

How can we pass a javascript value to a VF controller method without user interaction

We have a visualforce page that has a javascript function which initializes a var to some value. We need to pass this value to the controller of the visualforce page "without" any user interaction like onclick, onkeypress etc. How can we acheive this? Is there an equivalent functionality like *page onload* that can invoke a controller method?
Thanks and regards
Arun BalaArun Bala
You can call the JS function on body onload. From the JS function call a actionFunction that will make a ajax call to the controller class. HTH.