Hello,
There are often issues in calling controller class methods from javascript.
Here is a 3 step process.
1) Create a method in Controller class that returns PageReference
3) Now call this apex function from javascript method which will call your controller class method
Its Done...
There are often issues in calling controller class methods from javascript.
Here is a 3 step process.
1) Create a method in Controller class that returns PageReference
2) Create a method in Javascript from where you have to call the controller class method.
For this you have to create a Apex function (say uploadFiles).This acts as a bridge between the two methods
3) Now call this apex function from javascript method which will call your controller class method
Its Done...