Forum Discussion

BastienMdard's avatar
BastienMdard
Community Member
10 years ago

Javascript to print and email notes

Hello,

I am trying to implement Stephanie's javascript method for the learner to be able to print and send his/her notes by email, but I am having some difficulties.

Basically, the print option alone works well, but once I try to add a trigger for the email button, none of them work. It seems to interfere at some level. And I didn't manage to have the email trigger work alone. 

I am really not a coding expert (like many of us!), but if someone could help I would be most grateful!!

I am attaching two files:

- javascript_print_OK : the print javascript executes well 

- javascript_print_notOK : I added the javascript for email, but neither the print nor the email javascript execute.

Thank you !!

Bastien

15 Replies

  • BrianMcNulty1's avatar
    BrianMcNulty1
    Community Member

    The question from Aaron Kapala above:

    "This is great, my only question would be:

    How would the Javascript code need to be amended if you want to keep the format of the text that the learner has written?

    For example, if they write the following:

    'This information is very useful.

    It would be great to learn more.'

    It ends up printing like this:

    'This information is very useful. It would be great to learn more.'

    I know this is an old forum but as I was using this example it made sense to comment here rather than create a new question.

    Thanks, Aaron"

     

    Does anyone have a solution to this? I am having the same problem. Thanks!