Forum Discussion
- JasonLLithium Alumni (Retired)
Gursimrat wrote:
Can I? I read some where that FTL is executed before the JS, so it is not possible?
Hi Gursimrat,
It's not possible - freemarker templates are processed on the server-side first, before the page gets loaded on client-side
(javascript code gets executed only after the page is loaded in client-side browser)
--Jason
- AdamNKhoros Oracle
What kind of data are you trying to get through JavaScript? Perhaps there's another approach that could be used via Freemarker.
- GursimratLeader
We are creating a search, where we are reading the parameter from the URL, can we feed that to FTL? That is, whatever the user searches, in a custom search.
- JasonLLithium Alumni (Retired)
Gursimrat wrote:
We are creating a search, where we are reading the parameter from the URL, can we feed that to FTL? That is, whatever the user searches, in a custom search.
have you tried this?
http.request.parameters.name.get("parameter_name", default_value)
9.1.0 Returns a parameter set on the request, or the default value specified if the request parameter is not found.
Example
${http.request.parameters.name.get("page", 1)}
Ref:
Related Content
- 4 years ago
- 13 years agoInactive User