I am running javascript on a form that collects comments and then an email address. The user can type comments (note7) and then email them to the address they enter. However, I want the mailto action to open a gmail message window, instead of the user's default mail client. Once the blank gmail message is opened, I want to populate it with the comments and the address that come from the form.
Here is what I have tried (which only opens a message in the default client):
var player = GetPlayer();
var emailAddress = player.GetVar("emailAddress");
var note7 = player.GetVar("note7");
var subject = "Journal Notes";
var emailBody = note7
var mailto_link = 'mailto:' + emailAddress + '?subject=' + subject + '&body=' + encodeURIComponent(emailBody);
win = window.open(mailto_link, 'emailWin');
Any help with this javascript?