Announcement

Collapse
No announcement yet.

Email a friend

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Email a friend

    I've used the "email a friend" from P47 of the V7 "Advanced User's Guide", but when trying to send an email get a javascript error "unterminated script constant". Any thoughts on what went wrong?

    (I've taken it back off the site - www.flashharrys.co.uk - so it's not visible or available for testing)

    Also: I'd like the sender to be able to enter their email address. Can I capture both email sender and email recipient addresses?

    Rich
    Rich

    #2
    I think I wrote this. The Advanced Guide has added extraneous new lines to make it fit the page. Most of the code has to be on one v e r y l o n g line
    Code:
    Enter e-mail address to tell a friend
    <input type=text value="" size=40 onchange="var thisloc=location.href + '#NETQUOTEVAR:PRODUCTANCHOR';if (this.value != '') {location.href='mailto:' + this.value + '?subject=Take%20a%20look%20at%20NETQUOTEVAR:PRODUCTNAME&body=I%20saw%20' + thisloc + '%20and%20thought%20you%20would%20be%20interested.'}">
    <input type=button value="OK">
    This fires off the customers own e-mail program (E.g. Outlook Express) so the e-mail sent to the new contact will be identified correctly.
    Norman - www.drillpine.biz
    Edinburgh, U K / Bitez, Turkey

    Comment


      #3
      Thanks, Norman!

      Quick, quality response. I'm grateful.

      I have pasted the code you sent, and uploaded on www.flashharrys.co.uk -
      As you predicted, this does indeed fire up the email client, ready for the viewer to send off.

      Is there anyway to force a "space" after the hyperlink to the page anchor? At the moment the text is correct, but it needed the space after it in Outlook to trigger it as a hyperlink.
      Rich

      Comment


        #4
        Not sure what's happening. I don't use Outlook. However that's a correctly formed URL at present and works as expected with Outlook Express.

        If you want to tinker just add %20 where you want that space. Make sure that such changes don't break it on other more popular e-mail clients though.
        Norman - www.drillpine.biz
        Edinburgh, U K / Bitez, Turkey

        Comment

        Working...
        X