Copy link to clipboard
Copied
Has anyone been able to email variable values using Captivate 9 HTML5 lessons with a button?
I'd like to send quiz results and a derived value using an action script.
Any help gratefully received.
Roger
Copy link to clipboard
Copied
When you say ActionScript do you mean that you are using swf output?
To do this properly you do need to use an php page to send the email.
Copy link to clipboard
Copied
Thanks for the reply, I probably need to clarify my requirements further.
I need to author stand alone HTML5 Captivate quizzes that do not rely on any external resources (i.e. an apache server with a PHP email handler for example). By Action script I mean the Advanced actions within Captivate. I want a button to open the native email client i.e. Outlook and populate the email body with content. I can get the following to work for IE but not Chrome sadly.
Text box set to Text_Entry_Box_1
Button with javascript:
myvar = window.cpAPIInterface.getVariableValue("Text_Entry_Box_1");
mailto_link = "mailto:"+myvar+'?cc='+myvar+'&subject='+myvar+'&body='+myvar;
window.location.href = mailto_link
Works great in IE11 but does nothing in Chrome
Thanks
Roger
Copy link to clipboard
Copied
Ok sorry, I think I've solved it the correct code to work in both IE and chrome is window.location.assign
i.e.
myvar = window.cpAPIInterface.getVariableValue("Text_Entry_Box_1");
window.cpAPIInterface.setVariableValue("Text_Entry_Box_2",myvar);
mailto_link = "mailto:"+myvar+'?cc='+myvar+'&subject='+myvar+'&body='+myvar;
window.location.assign = mailto_link
Thanks anyways
Roger
Copy link to clipboard
Copied
Hi Roger,
I'm running into a similar issue in Cp9 and thought you might be able to help. I've built a 5 question multiple choice assessment (think personality assessment where any answer is correct) and once complete, user is shown the choices they've made on a results page (using advanced actions). I need to be able to send the user these results. Essentially I want them to click a button that fires an email to them with their results. Make sense? Is that something you can help me with.
Copy link to clipboard
Copied
The solution proposed above only triggers a new email to be opened in your end user's email client software (e.g. Outlook). It does NOT automatically send an email without the end user's interaction.
Captivate's standard functionality does not include sending automated emails. For that you would normally need to engage the services of a programmer who would then work out how to have data from the Captivate module transfer data to webserver-side pages to handle the actual email delivery.
Copy link to clipboard
Copied
Thanks Rod,
That’s really what I meant by ‘automated’ (that an email opens in end user’s email client software). I know how to do that part, but once the email pops in the end user’s client software, I need the email to have a few details of 1 slide.
Ryan
Copy link to clipboard
Copied
As the posts above indicate, you can also add some text to the BODY of an email using similar query parameter methods and JavaScript.
To achieve what you seem to be asking for, you're going to need to store the data in user variables and then use JavaScript to add those variable values to the BODY of the email which gets spawned in the end user's email client.
However, be aware that this mailto method of opening an email will not work in all cases. For example, it won't work if the end user doesn't use Outlook or some other similar software as an email client. What if they use some form of online email system where they have to log into a website to retrieve their email?
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more