I am having a visualforce component with some script written in it and I directly want to pass some values to the controller.this is My javascript code.
<script>
function uploadComplete(evt) {
var city = 'Shimla';
var location = 'kkllkk'
**i want to pass city and location in IWantToDebug method**
function IWantToDebug() {
MyController.IWantToDebug(city,location, function(result, event) {
// Set the inputField value to the result in here
});
} </script>
My apex controller class method is like.
public void IWantToDebug(String city , String location) {
System.debug('======================= ' + data);
}