suess0r Posted December 20, 2006 Share Posted December 20, 2006 hey guys, i've been playing with a way to have a user input their name and phone number and have a script to generate a text message to send to that phone. I've found some information on it in Cold Fusion but would like to keep it in javascript if that was possible.. here's what i've got[quote]<script language="javascript"><!--function validateit(){temp = true; if(document.form.name.value == '' || document.form.phone.value == '') { temp = false; alert('Please fill out the Name and Phone field to continue...'); } return temp;}//--></script></head><body><p align="center"><strong>INSTANT CALL BACK</strong><br>enter you name and number<br>and I will call you immediately.</p> <form name="form" action="sampleproc.cfm" method="post" enctype="multipart/form-data" onSubmit="return validateit();"> <table width="300" border="0" align="center" cellpadding="2" cellspacing="0"> <tr> <td width="125" valign="middle"> <div align="right">Your Name: </div></td> <td width="150" valign="top"><input type="text" name="name" onFocus="this.value=''" style="width:150px"></td> <td width="25" valign="middle"><div align="center">*</div></td> </tr> <tr> <td valign="middle"> <div align="right">Phone Number: </div></td> <td valign="top"><input type="text" name="phone" onFocus="this.value=''" style="width:150px" ></td> <td valign="middle"><div align="center">*</div></td> </tr> <tr> <td valign="top"><div align="right"> </div></td> <td valign="top"><div align="right"> <input type="submit" name="Submit" value="Call Me"> </div></td> <td valign="top"> </td> </tr> </table></form>[/quote]and here's my sampleproc.cfm code, but it's saying "The requested method POST is not allowed for the URL /sampleproc.cfm." uggggg....[quote]<CFMAIL To="phonenumber@cellphoneprovider.com" From="you@youremail.com" Subject="Web Alert" server="mail.yourmailserver.com">call #form.name# at #form.phone#FROM WEB SITE, Instant Call Back</CFMAIL><html><head><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><title>Confirmation</title><script language="javascript" type="text/javascript"> alert( "I have received your request and will be contacting you shortly" ); location.href = "sample.htm";</script></head><body></body></html>[/quote] Quote Link to comment Share on other sites More sharing options...
fenway Posted December 20, 2006 Share Posted December 20, 2006 CFMAIL isn't JS... nor is it an option. Quote Link to comment Share on other sites More sharing options...
artacus Posted December 20, 2006 Share Posted December 20, 2006 You should be able to just send an email thru an SMS gateway like teleflip.com or matezap.com Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.