RSS Feed/News Am I making this ajax request correct?

Status
Not open for further replies.

ENXF NET

Administrator
Staff member
Administrator
Moderator
+Lifetime VIP+
S.V.I.P.S Member
S.V.I.P Member
V.I.P Member
Collaborate
Registered
Joined
Nov 13, 2018
Messages
24,761
Points
823

Reputation:

this is the ajax

JavaScript:

Code:
    XF.ajax('GET', XF.canonicalizeUrl('statistics'), ajaxData, function (data) {

});

here is how I'm accessing in controller, selectedOption is in the ajaxData

PHP:

Code:
public function actionIndex(ParameterBag $params) {

$selectedOption = $this->filter('selectedOption', 'int');

$viewParams = [

'selectedOption': $selectedOption

];

return $this->view('mycontroller/action', 'my_template', $viewParams);

}

I'm using {$selectedOption} to access...

Read more

Continue reading...
 
Status
Not open for further replies.
Top