Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

Javascript

  • 21-10-2008 07:15PM
    #1
    Registered Users, Registered Users 2 Posts: 19


    I was wondering does anybody know of any code that i could add to my site that would allow a visitor to click the link and it would send an e-mail to my e-mail inbox with the url of the page where the link was clicked.

    I want to add it to a video page so that if the video dosent work anymore the visitor can just click it and then i will know and fix it.

    It would be great of somebody could help:)
    Tagged:


Comments

  • Registered Users, Registered Users 2 Posts: 569 ✭✭✭none


    <script language="javascript">document.write('<a href="mailto:you@mailer.com?subject=Comments from your site&body=Sent from \'' + location.pathname + '\' page">Mail me</a>');</script>
    

    This will open a new mail which a user must send with his mail client. If you want a mail to be sent by your server, you have to use some server side technology.


  • Closed Accounts Posts: 17,208 ✭✭✭✭aidan_walsh


    Which would be best for a feedback system. This method won't work for people who only use webmail unless they are willing to manually recreate it.


  • Closed Accounts Posts: 18,163 ✭✭✭✭Liam Byrne


    You can do it server-side using AJAX without opening a new window.

    Just as long as you don't need the "clicker's" email address (which from your description you don't)


  • Registered Users, Registered Users 2 Posts: 19 leateds


    Thanks for that bit of code but it is not exactly what i am looking for. I am looking for something like what liam byrne is talking about (above)


  • Registered Users, Registered Users 2 Posts: 569 ✭✭✭none


    Sorry if I misread your question :( But you only asked about JavaScript and that's one of the JavaScript only solutions. Other suggestions revolve around (and depend on) the server side technologies which you never mentioned ;)


  • Advertisement
Advertisement