/    Sign up×
Community /Pin to ProfileBookmark

email problem

Hi, I’m trying to write a mailto for a tell a friend script that can have multiple entries… I have ben able to populate the address field with two adressess so far (ultimately I’m looking to include five) but I cant seem to include the address seperator “;” … any help appreciated. Thanks in advance.
BJ
<SCRIPT LANGUAGE=”JavaScript”>
<!– Begin

var initialsubj=”Hi I’m pretty sure you’re really going to like this site!”
var initialmsg=”Hi:n I thought you’d like to check out this site: “+window.location
var good;
function checkEmailAddress(field) {

var goodEmail = field.value.match(/b(^(S+@).+((.com)|(.net)|(.edu)|(.mil)|(.gov)|(.org)|(.info)|(.sex)|(.biz)|(.aero)|(.coop)|(.museum)|(.name)|(.pro)|(..{2,2}))$)b/gi);
if (goodEmail) {
good = true;
}
else {
alert(‘Please enter a valid address.’);
field.focus();
field.select();
good = false;
}
}
u = window.location;
function mailThisUrl() {
good = false
checkEmailAddress(document.eMailer.email);
if (good) {

//window.location = “mailto:”+document.eMailer.email.value+”?subject=”+initialsubj+”&body=”+document.title+” “+u;
window.location = “mailto:”+document.eMailer.email.value+document.eMailer.email2.value+”?subject=”+initialsubj+”&body=”+initialmsg
}
}
// End –>

</script>
<input type=”text” name=”email” size=”26″ value=” Enter Address Here” onFocus=”this.value=”” onMouseOver=”window.status=’Enter email address here and tell a friend about this site…’; return true” onMouseOut=”window.status=”;return true”>
<br>
<input type=”text” name=”email2″ size=”26″ value=” Enter Address Here” onFocus=”this.value=”” onMouseOver=”window.status=’Enter email address here and tell a friend about this site…’; return true” onMouseOut=”window.status=”;return true”>
<br>

<input type=”button” value=”Submit” onMouseOver=”window.status=’Click to send an email (with this page address) to a friend! Enter email address above…’; return true” onMouseOut=”window.status=”;return true” onClick=”mailThisUrl();”>
</p>
</form

to post a comment
JavaScript

6 Comments(s)

Copy linkTweet thisAlerts:
@FangAug 26.2007 — Address separator is a comma
Copy linkTweet thisAlerts:
@BilkoJoeauthorAug 26.2007 — sorry If I'm not explaining this properly the seperator is the "; semi-colon" which appears between email address in Oepxress etc.

Cheers BJ
Copy linkTweet thisAlerts:
@FangAug 26.2007 — sorry If I'm not explaining this properly the seperator is the "; semi-colon" which appears between email address in Oepxress etc.

Cheers BJ[/QUOTE]

email address and what?
Copy linkTweet thisAlerts:
@BilkoJoeauthorAug 26.2007 — The script above contains TWO input boxes for the email addesses of the intended recipients. - having filled these in - When you click the submit button - the email lient opens - he adrress field is populated withhe emal addesses BUT there is no seperator:

[email][email protected]@qwe.co.uk[/email] I need it to generate:

[email][email protected][/email][B][COLOR="Red"]; [/COLOR][/B][email protected]


Hope this helps. Cheers J
Copy linkTweet thisAlerts:
@FangAug 26.2007 — Comma delimiter!
window.location = "mailto:"+document.eMailer.email.value[COLOR="Red"]+","+[/COLOR]document.eMailer.email2.value+"?subject="+initialsubj+"&amp;body= "+initialmsg
Copy linkTweet thisAlerts:
@BilkoJoeauthorAug 26.2007 — DUH! Sorry dumb as dirt here....- thanks a million...!
×

Success!

Help @BilkoJoe 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.24,
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,
)...