/    Sign up×
Community /Pin to ProfileBookmark

Email Robot Script

Can anyone help me with this little one?
I have been using the code below within my web page but am trying to incorporate an image into the script so the user just clicks the image to send me an Email. Currently the script displays my email address as script.
Regards

<script language=”JavaScript”><!–
// hide script
var sb_domain = “doncaster40.freeserve.co.uk”
var sb_user = “alan_grey”
var sb_recipient = sb_user + “@” + sb_domain
var sb_url = “mailto:” + sb_recipient
document.write(sb_recipient.link(sb_url));
// –></script>

to post a comment
JavaScript

5 Comments(s)

Copy linkTweet thisAlerts:
@swonDec 22.2002 — Try this:

<script language="JavaScript"><!--

// hide script

var sb_domain = "doncaster40.freeserve.co.uk"

var sb_user = "alan_grey"

var sb_recipient = sb_user + "@" + sb_domain

var sb_url = "mailto:" + sb_recipient

window.location.href= sb_url + sb_recipient;

// --></script>

You've used the document.write, that write it on your page.
Copy linkTweet thisAlerts:
@spuddyauthorDec 22.2002 — Hi Swon,

Thanks for your reply.

I have tried this script but when I now go to my page, a new email reply is automatically created.

What I would like the script to do is when an image is clicked the user is taken to the new message page to send me an email but using the script listed in the previous post.

The image I am trying to incorporate is located at http://www.doncaster40.freeserve.co.uk/email7.gif width=60 height=30 ALT="E-mail"
Copy linkTweet thisAlerts:
@ShrineDesignsDec 22.2002 — <script language="JavaScript">

<!--

var sb_domain = "doncaster40.freeserve.co.uk"

var sb_user = "alan_grey"

var sb_recipient = sb_user + "@" + sb_domain

var sb_url = "mailto:" + sb_recipient

document.write('<a href="sb_url + sb_recipient"><img src="email7.gif" width=60 height=30 alt="E-mail"></a>');

// -->

</script>
Copy linkTweet thisAlerts:
@spuddyauthorDec 28.2002 — Hi ShrineDesigns,

Thank you for your reply to my problem. I have inserted this script into my page, however when I run the script it takes me to an error page - This page Cannot be found -

It seems as if it is trying to take me to my web page rather than opening up a new message Email box.

I have inserted the code into the following address for your reference.

www.doncaster40.freeserve.co.uk/aaaaaa.html

Looking forward to your or anyones help.

Regards
Copy linkTweet thisAlerts:
@swonDec 28.2002 — Hi Spuddy,

I've put it into a function:

<script language="JavaScript"><!--

// hide script

function mailer()

{

var sb_domain = "doncaster40.freeserve.co.uk"

var sb_user = "alan_grey"

var sb_recipient = sb_user + "@" + sb_domain

var sb_url = "mailto:" + sb_recipient

window.location.href= sb_url + sb_recipient;

}

// -->

</script>

<a href="#" onClick="mailer()">email me</a>
×

Success!

Help @spuddy spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...