Help For Script

Rangau2

Well-known member
  • Dec 31, 2008
    20,468
    1,211
    113
    34
    දෙණියාය :)
    aka script akak newei ban 2 k 3k anawa...


    <script language="Javascript">
    <!--
    var charLeft = 144;
    /*function newPopup(URL, Name, features) {
    window.open(URL, Name, features);
    }*/

    function checkSend() {
    if (window.document.SMS.tele_no.value ==""){
    alert("Please Enter the SMS number !");
    window.document.SMS.tele_no.focus();
    return (false);
    } else if (window.document.SMS.sendername.value == "") {
    alert("Please compose Your Name !");
    window.document.SMS.sendername.focus();
    return (false);
    } else if (window.document.SMS.txtMsg.value == "") {
    alert("Please compose the message first !");
    window.document.SMS.txtMsg.focus();
    return (false);
    } else {
    checkOk = "+0123456789";
    checkStr = window.document.SMS.tele_no.value;
    allValid = true;
    for (j = 0; j < checkStr.length; j++) {
    ch = checkStr.charAt(j);
    for (k = 0; k < checkOk.length; k++)
    if (ch == checkOk.charAt(k))
    break;
    if (k == checkOk.length) {
    allValid = false;
    break;
    }
    }

    if ((!allValid) || (window.document.SMS.tele_no.value.length != 9)) {
    alert("Please enter a valid receipient's mobile number !\nEg. 711234567");
    window.document.SMS.tele_no.select();
    window.document.SMS.tele_no.focus();
    return (false);
    }
    return (true);
    }
    }

    function countChar() {
    if (window.document.SMS.txtMsg.value != "") {
    strInput = window.document.SMS.txtMsg.value;
    strLength = strInput.length;
    if (strLength > charLeft) {
    window.document.SMS.txtMsg.value = strInput.substring(0, charLeft);
    alert ("Maximum allowed message length exceeded !");
    strLeft = 0;
    } else {
    strLeft = charLeft - strLength;
    }
    if (strLeft < 10) {
    window.document.SMS.txtLeft.value = " " + strLeft + " characters left";
    } else if (strLeft < 100) {
    window.document.SMS.txtLeft.value = " " + strLeft + " characters left";
    } else {
    window.document.SMS.txtLeft.value = " " + strLeft + " characters left";
    }
    }
    }

    function updateCount() {
    if (charLeft < 10) {
    window.document.SMS.txtLeft.value = " " + charLeft + " characters left";
    } else if (charLeft < 100) {
    window.document.SMS.txtLeft.value = " " + charLeft + " characters left";
    } else {
    window.document.SMS.txtLeft.value = " " + charLeft + " characters left";
    }
    }

    //-->
    </script>
     

    Rangau2

    Well-known member
  • Dec 31, 2008
    20,468
    1,211
    113
    34
    දෙණියාය :)
    <script language="JavaScript" type="text/JavaScript">
    <!--
    updateCount();
    window.document.SMS.tele_no.focus();
    //-->
    </script>
    <script language="JavaScript" type="text/JavaScript">
    function disableRightClick(e)
    {
    var message = "We work in the dark,\n We do what we can,\nWe give what we have,\n Our doubt is our passion,\nAnd our passion is our task.\n The rest is the madness of art\n------------- [U2media team ------------- ";

    if(!document.rightClickDisabled) // initialize
    {
    if(document.layers)
    {
    document.captureEvents(Event.MOUSEDOWN);
    document.onmousedown = disableRightClick;
    }
    else document.oncontextmenu = disableRightClick;
    return document.rightClickDisabled = true;
    }
    if(document.layers || (document.getElementById && !document.all))
    {
    if (e.which==2||e.which==3)
    {
    //alert(message);
    return false;
    }
    }
    else
    {
    //alert(message);
    return false;
    }
    }
    disableRightClick();
    </script>