viewing paste Unknown #6614 | Javascript

Posted on the
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 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120
<script type="text/javascript">
 
$(document).ready(function(e) {
    $('#lbOverlay,#lbCloseLink').click(function() {
    $('object').css('visibility','visible');
});
 
});
 
function dropcoment()
{
        $('#slider').slideToggle();
}
 
 
function chkcoment()
{var coment=document.getElementById('youtube_des').value;
        if(coment.length==0 || coment.length==null || coment.length==1)
        {
                alert('Please enter a comment to proceed !');
                return false;
        }
        return true;
}
 
 
function deleteObject(cheObj){
   if (confirm('Are you sure you want to Delete video? ')){
      document.delForm.deleteid.value = cheObj.id;
      document.delForm.submit();
   }else{
      cheObj.checked = false;
   }
}
 
function deleteComent(comObj){
   if (confirm('Are you sure you want to Delete Comment ? ')){
      document.comDel.comdelid.value = comObj.id;
      document.comDel.submit();
   }else{
      comObj.checked = false;
   }
}
 
 
function viewUpdate(imgId){
        var url = "viewUpdate.php?imgId="+imgId;
        $.ajax({
                type: "POST",
                url: url,
                success: function (result) {
                                var currCount = document.getElementById('view'+imgId).innerHTML;
                                var nowCount = currCount*1 + 1;
                                document.getElementById('view'+imgId).innerHTML = nowCount
                }
         });
}
 
<?php
$sql_select_words = $db->query("SELECT comentlimit FROM " . DB_PREFIX . "gen_setts");
$word_details = $db->fetch_array($sql_select_words);
$num_char = $word_details['comentlimit'];
?>
 
var descCharLimit = "<?php echo $num_char;?>";
 
function checkPaste(){
        setTimeout("validatePasteTextArea()",100)
}
function validatePasteTextArea(){
        maxlimit = descCharLimit;
        if(document.getElementById('video_des').value.length > maxlimit){
                alert("Maximum length for video description is limited to "+descCharLimit+" charaters.¥nYour current description character count is "+document.getElementById('video_des').value.length);
                document.getElementById('video_des').value = document.getElementById('video_des').value.substring(0, maxlimit);
                document.getElementById('video_des').focus();
        }
        document.getElementById(("msgreplycount")).innerHTML = maxlimit - document.getElementById('video_des').value.length;
}
function validateTextArea(field,maxlimit){
        if(field.value.length > maxlimit){
                field.value = field.value.substring(0, maxlimit);
                document.getElementById('video_des').focus();
        }
        var diff = maxlimit - field.value.length;
 
        document.getElementById(("msgreplycount")).innerHTML = maxlimit - field.value.length;
}
function clearCount(field){
        document.getElementById(("msgreplycount")).innerHTML = descCharLimit;
}
 
function prevImg(){
   currcounter--;
  if(!prenextArr[currcounter]){
var tLen = prenextArr.length - 1;
    currcounter = tLen;
  }
if(prenextArr[currcounter]){
   document.getElementById("viewfull").href = prenextArr[currcounter]['href'];
   document.getElementById("mainimg").src= prenextArr[currcounter]['src'];
   document.getElementById("heading").innerHTML= prenextArr[currcounter]['head'];
}
}
 
function nextImg(){
currcounter++;
  if(!prenextArr[currcounter]){
    var tLen = 0;
    currcounter = tLen;
  }
if(prenextArr[currcounter]){
   document.getElementById("viewfull").href = prenextArr[currcounter]['href'];
   document.getElementById("mainimg").src= prenextArr[currcounter]['src'];
   document.getElementById("heading").innerHTML= prenextArr[currcounter]['head'];
}
}
 
 
</script>
 
Viewed 542 times, submitted by unknown.