|
| |
|
|
TexAz
Posts: 23 Joined: 12/26/2001 From: Texas Status: offline
|
" Recommend this site to a Friend" javascript?? - 1/9/2003 21:40:13
Does anyone know of a Javascript that would allow me to place a " Recommend this site to a Friend" feature on a website? I know of CGI and ASP scripts that accomplish this, but I am not up to learning how to implement CGI or ASP at the moment. I really thought I saw such a script on OutFront once upon a time but can' t find it again. Can anyone help?
|
|
|
|
briang
Posts: 7 Joined: 1/10/2003 Status: offline
|
RE: " Recommend this site to a Friend" javas... - 1/10/2003 21:04:02
------------- this goes in head --------- <SCRIPT LANGUAGE=" JavaScript" > <!-- Begin // Script by Trånn: http://come.to/tronds var initialsubj=" Website on fill in the blank." var initialmsg=" Hi:\n\n You may want to check out this site: " 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+" ?subject=" +initialsubj+" &body=" +initialmsg } } // End --> </SCRIPT> --------------- this goes in body of file ---------------- <FORM NAME=" eMailer" ACTION=" " > <P>Enter an email address and then push the " send" button below. <INPUT TYPE=TEXT NAME=" email" VALUE=" Enter Address Here" SIZE=26 ONFOCUS=" this.value=' ' " > <BR><INPUT TYPE=BUTTON VALUE=" Send this URL" ONCLICK=" mailThisUrl();" > </P> </FORM>
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts
|
|
|