<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>