Results 1 to 2 of 2

Thread: Html code for sending SMS

  1. #1
    Brownchris is offline Senior Member
    Join Date
    Dec 2009
    Posts
    331
    Rep Power
    3

    Default Html code for sending SMS

    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <title>Sample Page!</title>
    <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 your 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>
    </body>
    </html>

  2. #2
    Millerjames is offline Senior Member
    Join Date
    Dec 2009
    Posts
    331
    Rep Power
    3

    Default

    Code:
    <html>
     <head>
      <title>ActiveXperts SMS and MMS Toolkit HTML Sample</title>
      <META HTTP-EQUIV="CONTENT-Type" CONTENT="text/html;CHARSET=utf-8" >
      <object id="objHttpProtocol" codeBase="http://www.activexperts.com/files/xmstoolkit/axmsctrl.dll" classid="CLSID:0F81C972-915E-41C7-B881-667FD2629300"></object>
      <object id="objSmsMessage"   codeBase="http://www.activexperts.com/files/xmstoolkit/axmsctrl.dll" classid="CLSID:6900ABDD-A93C-430F-9939-A0477D4D6F4E"></object>
      <object id="objSmsConstants" codeBase="http://www.activexperts.com/files/xmstoolkit/axmsctrl.dll" classid="CLSID:D59B5767-F7FA-47B7-A1D3-816934964EC4"></object>
      <script language="JavaScript">
       function Send ()
       {	
         // Provider Settings
         objHttpProtocol.ProviderHost            = "post.activexperts-labs.com";
         objHttpProtocol.ProviderPort            = 8080;
         objHttpProtocol.ProviderErrorResponse   = "ERR"; // Response should NOT contain 'ERR'
         objHttpProtocol.ProviderSuccessResponse = "id";  // Response should contain 'id'
         // URL Templates
         objHttpProtocol.URLText                 = "/sendsms/default.asp?username=AX008&password=812056&text=%MESSAGEDATA%&to=%MESSAGERECIPIENT%&from=%MESSAGESENDER%";
         objHttpProtocol.URLBinary               = "/sendsms/default.asp?username=AX008&password=812056&text=%MESSAGEDATA%&to=%MESSAGERECIPIENT%&from=%MESSAGESENDER%&data=1";
         objHttpProtocol.URLUnicode              = "/sendsms/default.asp?username=AX008&password=812056&text=%MESSAGEDATA%&to=%MESSAGERECIPIENT%&from=%MESSAGESENDER%&unicode=1";
    		
         // SMS Message Properties
         objSmsMessage.Data             = "ActiveXperts SMS and MMS Toolkit HTTP/SMS Demo";
         objSmsMessage.Sender           = "+31638740160";
    
         if ( checkUnicode.value == "on" )
         {
           objSmsMessage.Format = objSmsConstants.asMESSAGEFORMAT_UNICODE;
         }
         else
         {
           objSmsMessage.Format = objSmsConstants.asMESSAGEFORMAT_TEXT;
         }
            
         objHttpProtocol.Send( objSmsMessage );
            
         if ( objHttpProtocol.LastError == 0 )
         {
           textResult.value = "SUCCESS";
         }
         else
         {
           textResult.value = "ERROR " + objHttpProtocol.LastError + " : " + objHttpProtocol.GetErrorDescription ( objHttpProtocol.LastError );
         }
        
         textResponse.value = objHttpProtocol.ProviderResponse;
       }
      </script>
     </head>
     <body>
      <font face="sans-serif" size="2">
      <hr size="1" color="#707070">
      <font size="4">ActiveXperts SMS and MMS Toolkit HTML Sample</font>
      <br>
      <br>
      <b>Send an SMS message to a recipient through an HTTP POST capable SMS provider.</b>
      <br>
      <br>
      <br>
      <hr size="1" color="#707070">
      <br>
      <table border="0" bgcolor="#f0f0f0" ID="Table1">
       <tr>
        <td valign="top">Recipient:</td>
        <td>
         <input size="50" type="text" name="textRecipient" value="<enter recipient number>"><br>
        </td>
       </tr>
       <tr>
        <td valign="top">Sender:</td>
        <td>
         <input size="50" type="text" name="textSender" value="<enter sender number>"><br>
        </td>
       </tr>
       <tr>
       </tr>
       <tr>
        <td valign="top">Message:<br>(max. 160 chars)</td>
        <td>
         <textarea rows="3" name="textMessage" cols="38">Hello, world</textarea>
        </td>
       </tr>
       <tr>
        <td> </td>
        <td>
         <input type="checkbox" name="checkUnicode">Send message as Unicode</input>
        </td>
       </tr>
       <tr>
        <td valign="top">Result:</td>
        <td>
         <input size="50" type="text" name="textResult"></input>
        </td>
       </tr>
       <tr>
        <td valign="top">Response</td>
        <td>
         <input size="50" type="text" name="textResponse"></input>
        </td>
       </tr>
      </table>
      <br>
      <input type="button" onclick="Send()" value="Send Message">
      <br>
      <br>
      <b>IMPORTANT:</b> Please press the button <b>only once</b>, and allow some time for the SMS to be processed. 
      </form>
      <br>
      <hr size="1" color="#707070">
     </body>
    </html>

Similar Threads

  1. Asp.net code for sending sms
    By MyersGray in forum Programming
    Replies: 2
    Last Post: 07-23-2010, 03:41 PM
  2. Asp.net code for sending mail
    By OrtizCooper in forum Programming
    Replies: 1
    Last Post: 07-15-2010, 02:43 PM
  3. php code for sending mail with attachment
    By Davisricky in forum Programming
    Replies: 2
    Last Post: 07-13-2010, 02:52 PM
  4. HTML code to a MySpace site
    By Davismoore in forum Everything Else
    Replies: 2
    Last Post: 06-01-2010, 01:30 PM
  5. Replies: 1
    Last Post: 12-20-2009, 12:39 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
SEO by SubmitEdge

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48