Reputation: 17884
I started to use ssi and i came across with the ssi conditions -
if, elif, else, endif directives that work like conditional statements and are used to mark code which is to be included in a page if the conditions are met.
I know that there is a way to copy SSI variables to JavaScript variables.
The question is, if there is a way to do the other way (Copying JavaScript variables to SSI variables)?
I know that since the ssi is processed before the page reaches the browser it is possible to pass any variable from the SSI environment to client-side JavaScript.
maybe there is a manipulation way to do it?
EDIT: There is a way to get parameters from the url (with ssi)?
Upvotes: 0
Views: 659
Reputation: 944203
No. It isn't possible.
Server side code runs. Then client side code runs.
Client side code can't send data to the server without starting a new HTTP request.
Such a request could cause the page to be reloaded with data in the query string, or it could use XMLHttpRequest (or some other Ajax tool) to fetch the data and insert it into the DOM using JS.
Upvotes: 1