Forum Discussion
Need help with open-ended responses download
These are the files. Yes, the web object is what's responsible for collecting user responses as well as generating the PDF. Thanks.
- AndrewBlemings-1 day agoCommunity Member
You were really close. There are two different things working against the script. The first is that some of your questions contain apostrophes inside the text:
That's a hiccup because when the script reads your question, it interprets the apostrophe in Jersey's as the end of that text string. That means "s Chafee Plan." is interpreted as random characters outside of a text string, and then what you intended to be the closing apostrophe ends up signaling to the browser that a new text string is beginning. This throws a lot of red flags for the browser so it cuts the whole thing short, ending the script.
Adding apostrophes to JSON objects like you want will require using the backslash as an "escape character."
That signals to the browser that the apostrophe you're including should be rendered as text, not interpreted as part of a command. If you're going to work in JavaScript but don't have a code editor on your computer (e.g., VS Code), then I'd recommend pasting your code into an online tool like jsfiddle.net anytime it's not working. Errors are much more obvious when they're color-coded like so:
That screenshot shows that something funky is going on with "Chafee Plan," allowing us to see the error much quicker. I've attached a fixed version of the .html file, so just overwrite your original with the "escaped" version.
Secondarily, your folder has the js.map file but not the js file the map maps. At least for me, the console was throwing errors with the map file. I downloaded the actual min.js file and added it to the src folder. You're able to download it by opening this and right-click saving.
Lastly, Storyline will hang onto the old web object files so you'll need to outright delete the web object and add a new one with the updated files. Otherwise when you publish, it'll still use the old ones. I was able to create the PDF with all six of my test answers so hopefully this fixes it for you.
Related Content
- 2 months ago
- 4 months ago
- 7 months ago