Jump to content

Text a Phone from your computer?!?!


suess0r

Recommended Posts

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:&nbsp; </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:&nbsp; </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">&nbsp;</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="[email protected]" From="[email protected]" 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]
Link to comment
https://forums.phpfreaks.com/topic/31387-text-a-phone-from-your-computer/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.