jimzstone Moderator


Posts: 56 Join date: 2009-02-19 Age: 18 Location: Laguna
 | Subject: Tell a friend script Fri Feb 20, 2009 7:28 am | |
| Description: Let visitors refer others to your webpage (via email) with this script! It asks for the friend's email address, then loads the email program with the essential information pre-filled to instantly send off. | Code: | <script LANGUAGE="Javascript"> <!-- Begin var initialsubj="Hay buddy, take a look at this" var initialmsg="Hi:n You may want 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+"?subject="+initialsubj+"&body="+initialmsg } } // End --> </script> <form name="eMailer"> Tell a friend: <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="button" value="Send this URL" 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();"> </form> |
|
|
Admin Admin


Posts: 97 Join date: 2009-02-09 Age: 16 Location: Montalban Rizal (Philippines)
 | Subject: Re: Tell a friend script Fri Feb 20, 2009 7:43 am | |
| nice.. kuya jim.. keep it up! mas maganda sana kung tutorial lagay mo tapos hide mo yung mga tutorial tapos ilalagay mo ganito --- If you are a *registered user* : you need to post in this topic to see the message ---para ma hide ito ang code | Code: | [hide]tapos kahit ano ilagay mo dito[/hide] |
|
|
jimzstone Moderator


Posts: 56 Join date: 2009-02-19 Age: 18 Location: Laguna
 | Subject: Re: Tell a friend script Fri Feb 20, 2009 7:51 am | |
| k mya ko gawin  |
|
jimzstone Moderator


Posts: 56 Join date: 2009-02-19 Age: 18 Location: Laguna
 | Subject: Re: Tell a friend script Fri Feb 20, 2009 12:20 pm | |
| pwede n pala to  kaysa mangdamot ka pa  |
|