Visualizzazione dei risultati da 1 a 5 su 5
  1. #1

    javascript per inserire un sistema che invia sms sul mio sito

    salve, sono nuovo su questo forum. ho un sito e vorrei inserire un tab per essere contattato tramite sms dai miei amici, clienti. in pratica il mio numero di cellulare non deve essere visibile agli altri.... magari dovrebbe essere già impostato come indirizzo mittente unico che sarei io.... non so se si può fare. grazie aspetto con ansia e grazieeeeee

  2. #2
    dimenticavo il mio sito è stato fatto con google

  3. #3
    tipo come questo.....
    <html>
    <head>
    <SCRIPT LANGUAGE="JavaScript" src="FileMain.js"></SCRIPT>
    </head>
    <body>
    <table width="300" border="1" cellspacing="0" cellpadding="3" height="170" bordercolor=#007198>


    <style type="text/css"><!--
    .testo1 { color: #007198; font-style: bold; font-size: 11px; line-height: 10px; font-family: Arial, Helvetica, sans-serif; text-align: left }
    .testo1b { color: #007198; font-style: bold; font-size: 12px; line-height: 10px; font-family: Arial, Helvetica, sans-serif; text-align: left }
    .testo2 { color: #ff0000; font-style: bold; font-size: 14px; line-height: 10px; font-family: Arial, Helvetica, sans-serif; text-align: left }
    --></style>


    <script Language="JavaScript"><!--


    function messcontacar() {
    conta=120-document.smsArubaForm.smstesto.value.length ;
    document.smsArubaForm.smscar.value=conta;
    if (conta < 0) {
    smsArubaForm.smstesto.value = smsArubaForm.smstesto.value.substr(0, 120);
    document.smsArubaForm.smscar.value=0;
    }
    }


    function sms_Valid(TheForm,StrVar1,StrVar2,StrVar3,StrVar4, StrVar6,StrVar7,StrVar8) {
    theForm=document.smsArubaForm;
    bono=true;


    prefiss=theForm.smsprefcell.selectedIndex;
    if ( document.smsArubaForm.smsprefcell.value == "") {
    alert("Seleziona prefisso cellulare.");
    theForm.smsprefcell.focus();
    bono=false;
    }
    if (bono==true & theForm.smsdestinatario.value.length < 1) {
    alert("Attenzione: inserire numero cellulare Destinatario!");
    theForm.smsdestinatario.focus();
    bono=false;
    }
    if (bono==true & theForm.smsdestinatario.value.length < 6) {
    alert("Attenzione: lunghezza numero cellulare Destinatario non valida!");
    theForm.smsdestinatario.focus();
    bono=false;
    }
    if (bono==true & theForm.smsdestinatario.value.length > 7) {
    alert("Attenzione: numero cellulare Destinatario troppo lungo!");
    theForm.smsdestinatario.focus();
    bono=false;
    }
    if (bono==true) {
    var checkOK = "0123456789";
    var checkStr = theForm.smsdestinatario.value;
    var allValid = true;
    for (i = 0; i < checkStr.length; i++)
    {
    ch = checkStr.charAt(i);
    for (j = 0; j < checkOK.length; j++)
    if (ch == checkOK.charAt(j))
    break;
    if (j == checkOK.length) {
    allValid = false;
    break;
    }
    }
    if (!allValid) {
    alert("Inserire solo numeri nel campo Numero Cellulare.");
    theForm.smsdestinatario.focus();
    bono=false;
    }
    }
    if (bono==true & theForm.smstesto.value.length < 1) {
    alert("Attenzione: inserire testo messaggio!");
    theForm.smstesto.focus();
    bono=false;
    }


    /*if (theForm.smstesto.value.indexOf('"') != -1) {
    alert('Il carattere " non è ammesso.')
    return false
    }*/


    if (bono==false)
    {
    return false
    }
    else
    {
    GeneraCookie(StrVar1,StrVar2,StrVar3,StrVar4,StrVa r6,StrVar7,StrVar8)
    Redirect()
    }
    }




    /////////////////////////////////
    function Redirect()
    {
    window.open("ProxyPage.php?TipoOperazione=UNO","fi nestra","toolbar=no,location=no,directories=no,sta tus=no,me nubar=no,scrollbars=no,resizable=no,width=400,heig ht=300,top=200,left=450")
    }




    function GeneraCookie(StrVar1,StrVar2,StrVar3,StrVar4,StrVa r6,StrVar7,StrVar8)
    {
    var UrlCliente = ""
    setCookie("TestoMessaggio",StrVar1)
    setCookie("NumeroMessaggio",StrVar2)
    setCookie("PrefissoMessaggio",StrVar3)
    setCookie("MittenteMessaggio",StrVar4)
    setCookie("smstipodest",StrVar6)
    setCookie("tptarget",StrVar7)
    setCookie("smspubblicit",StrVar8)
    UrlCliente = document.location.host + document.location.pathname
    setCookie("UrlCliente",UrlCliente)
    }
    ///////////////////////////////////////






    //-->
    </script>


    <form method="POST" name="smsArubaForm">
    <input type=hidden name="smstipodest" value=30>
    <input type=hidden name="tptarget" value=4>
    <input type=hidden name="smspubblicit" value="">
    <tr><td width="300">
    <table width="300" border="0" cellspacing="0" cellpadding="0">
    <tr><td colspan=2>
    <table border=0 cellpadding=0 cellspacing=0>
    <tr><td colspan=2><font class="testo1">Numero Cellulare DESTINATARIO </font>
    <font class="testo2"> *</font></td></tr>
    <tr><td><select name="smsprefcell" style="width:80px;" class=testo1b>
    <option selected>Prefisso</option>
    <td><input type=text name="smsdestinatario" maxlength=7 size=16 style="WIDTH: 150px"></td></tr>
    </table>
    </td></tr>
    <tr><td width="180">
    <table border=0 cellpadding=0 cellspacing=0>
    <tr><td><font class="testo1">MITTENTE (max 11 car.) </font></td></tr>
    </table>
    </td>
    <td><font class="testo1"> </font></td></tr>
    <tr><td>
    <input type=text name="smsmittente" maxlength=11 size=12 style="WIDTH: 150px">
    </td>
    <td>
    <table border=0 cellpadding=0 cellspacing=0>
    <tr><td><input type=text value="120" name="smscar" disabled
    size="3" maxlength="20" style="width:50px"></td>
    <td><font class="testo1"> Caratteri disponibili</font></td></tr>
    </table>
    </td></tr>
    <tr Valign=bottom><td height=22 colspan=2>
    <table border=0 cellpadding=0 cellspacing=0>
    <tr><td><font class="testo1">TESTO DEL MESSAGGIO (max 120 car.)</font></td>
    <td width=5><font class="testo2"> *</font></td></tr>
    </table>
    </td></tr>
    <tr><td height=35 colspan=2 Valign=top>
    <textarea cols="33" rows="3" style="scrollbar-3dlight-color: FFFFFF; scrollbar-arrow-color: 808080; scrollbar-base-color: FFFFFF; scrollbar-darkshadow-color: FFFFFF; scrollbar-face-color: FFFFFF; scrollbar-highlight-color: FFFFFF; scrollbar-shadow-color: FFFFFF; scrollbar-track-color: FFFFFF" type="text" name="smstesto" onkeyup="javascript:messcontacar();" onchange="javascript:messcontacar();" style="WIDTH: 290px"></textarea>
    </td></tr>


    <tr><td colspan=2>
    <table width="300" border="0" cellspacing="0" cellpadding="0" height="24">
    <tr><td width=130 Valign=top>
    <div align="left">
    <table border=0 cellpadding=0 cellspacing=0>
    <tr><td height=15><font class="testo2">* </font></td>
    <td><font class="testo1">campo obbligatorio</font></td></tr>
    </table>
    </div></td>
    <td width="110">
    <table border=0 cellpadding=0 cellspacing=0>
    <tr><td width=8><font class="testo2"> </font></td>
    <td><input type="button" OnClick="return sms_Valid(this,document.smsArubaForm.smstesto.valu e,document.smsArubaForm.smsdestinatario.value,docu ment.smsArubaForm.smsprefcell.value,document.smsAr ubaForm.smsmittente.value,document.smsArubaForm.sm stipodest.value,document.smsArubaForm.tptarget.val ue,document.smsArubaForm.smspubblicit.value)" name="Invia" value="Invia Messaggio" style="width:130px"></td></tr>
    </table>
    </td></tr>
    </table>
    </td></tr>
    </table>
    </td></tr>
    </form>
    </table>
    </body>
    </html>

  4. #4
    Moderatore di Annunci siti web, Offro lavoro/collaborazione, Cerco lavoro L'avatar di cavicchiandrea
    Registrato dal
    Aug 2001
    Messaggi
    26,133
    Salve e benvenuto.
    L'invio di sms sono servizi esterni a pagamento, gli stessi gestori del servizio spesso forniscono moduli form per l'invio.
    Da quello che leggo e da quello che utilizza non credo sia in grado di poterlo integrare nel sito, se il sito è istituzionale (non amatoriale) le consiglio di affidarsi ad un professionista.
    Saluti.
    Cavicchi Andrea
    Problemi con javascript, jquery, ajax clicca qui

  5. #5
    OK, grazie...

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.