I am trying to create an Ajax call from a Fluid template using the Fluid URI action ViewHelper. However, I am facing an issue where one of the arguments needs to be dynamically obtained from a Javascript variable. How can I ensure that the ViewHelper is rendered by Fluid and the content of the Javascript variable is inserted at runtime?
Below is a simplified version of my code:
function test(field) {
xmlhttp.open("GET", '<f:uri.action action="ajax" arguments="{filterfield:' + field + '}" />', true);
}
Currently, the Fluid rendered output appears as follows:
function test(field) {
xmlhttp.open("GET",'mod.php?...&tx_test_test_testview%5Bfilterfield%5D=%20%2B%20field%20%2B%20...', true);
}
However, my desired output is:
function test(field) {
xmlhttp.open("GET",'mod.php?...&tx_test_test_testview%5Bfilterfield%5D=' + field + '...', true);
}
I have indicated ...
where the output is not significant.