Forum Discussion
Storyline / Javascript Help
Hi @Jason Halterman
I suspect the code you are using is based on a post I did some time ago on this site. Certainly the function names are the same and the basic code structure follows the same pattern.
I've had a look through your JavaScript and I couldn't see any glaring errors - so I loaded and tested it. You get an error message:
So, your problem would appear to be in loading the pdf form template from Google Docs. I then tried simply copying the pdf template file to the root Directory and changing where you read the file from:
This version generated a different error:
Which would indicate to me that, this time the file was read - But there is an error in one of your "setText" commands where the variable you are trying to write to the file is the wrong data type - i.e. it isn't text.
I have to own up to disliking Google Docs (irrationally) - so I'm afraid I can't help much with that problem - but the url you supply needs to be the pdf file itself - so it should end in ".pdf" whereas the url you are using doesn't.
Once you've fixed that you will then need to check that all the variables you are collecting from Storyline are text variables and convert any that aren't. PLUS you need to check that you are not passing any "null" text to the file. Don't let the user leave a field blank.
Hope that helps??