How to pass parameters to lang from js? |
In one of my DataTable column I have this code:
PHP Code: { I'm looking for a way to pass date and hour as lang parameter, infact in my localization I have this: PHP Code: 'published_on' => 'Published {0} on {1}',
You can't do this like that. PHP run on the server, it send the final HTML document to the browser, then the JavaScript code run in the browser. So your JS code can't send parameter to a PHP function.
PHP Code: { This might work. It's not clear what format data.published_date is in.
I think you should use AJAX post method if you want to send something from JS to server.
|
Welcome Guest, Not a member yet? Register Sign In |