Thanks Denis.
I using values from previous pages. (Unless I misunderstand how LS functions)
My situation: My survey displays, I complete the answers, I click submit.
A new page is shown, with my End Message. (Found in 'Survey settings -> Text elements')
It is here in my end message that I want to use the values from questions/answers.
I can display the value as text OK, but it is always inside a <span> element and this is a problem if I want to use the number in javascript or css.
Version 3.14.9
Windows Server 2016
sqlsrv
Thank you
If anyone has my same problem and wants a quick cheap fix, it is quite simple to extract the value from the span element via javascript, which then I can use the value how I want. (Use to hide elements, change styles etc)
AB05 is the code id of the question I want to get the value of the answer from.
Code:
<script type="text/javascript" charset="utf-8">
$(document).on('ready pjax:complete',function() {
function extractContent(s) {
var span = document.createElement('span');
span.innerHTML = s;
return span.innerText;
};
var my_value = extractContent("{AB05}");
alert(my_value);
});
</script>
Due to this being javascript, it is run after the page is complete and is client side.
If I could do what I wanted (use the value in css itself, without LS generating a span element), the value would be created server side, which is nice.