NetTalk Central
NetTalk Web Server => Web Server - Ask For Help => Topic started by: ianburgess on June 15, 2012, 04:31:57 AM
-
I have a web form (Memory not Table) that has some code embedded into "ValidateUpdate.2 End" so that the code is run when the form is accepted. The code creates a strng of email addresses separated by ; which I need to be "MAILTO" so that the default mail client on the user's machine opens with the email addresses inserted.
The email string is held in LOC:MailtoString and this is also saved into a session variable: p_web.SSV('MailtoString',CLIP(LOC:MailtoString))
This might seem a sill question, but what/where do I embed to perform the actual MAILTO?
Thanks
Ian
-
There's a SendEmail example (12? I think?) which should point you in the right direction here.
-
Example 11 is a Sendmail example that uses Nettalk to send email. What I want to do is use "SENDTO" to pop up the user's default mail client and just populate the "To" email addresses. What I am struggling with is launching the "MAILTO" command from my embed. The actual MAILTO command would be:
'MAILTO:' & p_web.GSV('MailtoString')
.... but what is the embed to effectively open a link with the above?
-
I tried putting 'MAILTO:' & p_web.GSV('MailtoString') in the "URL on Save" box in the template, however, when I do this, the code that I had embedded in the ValidateAll embed which was previously run on clicking the "Save" button now does not run!
I am confused???
Any help as to the right way to achieve my aim of running some code and then doing a "Mailto:" on clicking Save would be appreciated.
-
In the server code for the button put;
p_web.script(p_web.windowopen('mailto:bruce@whatever.com'))
-
Thanks Bruce - that did the trick!
Ian