191 lines
4.8 KiB
JavaScript
191 lines
4.8 KiB
JavaScript
function UrlExists(url)
|
|
{
|
|
var http = new XMLHttpRequest();
|
|
http.open('HEAD', url, false);
|
|
http.send();
|
|
if(http.status==404){return false;}
|
|
else{return true;}
|
|
return http.status!=404;
|
|
}
|
|
|
|
|
|
function updatecount()
|
|
{
|
|
jQuery("#comment_submit").prop( "disabled", true );
|
|
jQuery("#comment_submit").val("Sending...");
|
|
|
|
datasend={
|
|
"comment_body": jQuery("#comment_body").val(),
|
|
"comment_submit": jQuery("#comment_submit").val(),
|
|
"task": jQuery("#task").val(),
|
|
"type": jQuery("#type").val(),
|
|
"iden": jQuery("#iden").val(),
|
|
"value": jQuery("#value").val(),
|
|
"user": jQuery("#user").val(),
|
|
"tab": jQuery("input#tab").val(),
|
|
"col": jQuery("#col").val(),
|
|
"tab_parent": jQuery("#tab_parent").val(),
|
|
"col_parent": jQuery("#col_parent").val(),
|
|
"child": jQuery("#child").val(),
|
|
"object_owner_id": jQuery("#object_owner_id").val(),
|
|
"object_owner": jQuery("#object_owner").val(),
|
|
"object_id": jQuery("#object_id").val(),
|
|
"object": jQuery("#object").val()
|
|
}
|
|
|
|
jQuery.ajax({
|
|
type: "POST",
|
|
url: "misc_js.php",
|
|
data: datasend,
|
|
success: function (returnedData) {
|
|
jQuery("#comment_submit").prop( "disabled", false );
|
|
jQuery("#comment_body").val("");
|
|
jQuery("#comment_submit").val("Post Comment");
|
|
loadXMLDoc(1);
|
|
|
|
},
|
|
dataType: "text"
|
|
});
|
|
|
|
if(document.getElementById('comment_body').value!=""){
|
|
total=document.getElementById('totalcomments').innerHTML;
|
|
total=total*1;
|
|
document.getElementById('totalcomments').innerHTML=total+1;
|
|
}
|
|
|
|
return false;
|
|
}
|
|
|
|
function updatecount1()
|
|
{
|
|
jQuery("#comment_submit").prop( "disabled", true );
|
|
jQuery("#comment_submit").val("Sending...");
|
|
|
|
datasend={
|
|
"comment": jQuery("#comment_body").val(),
|
|
"comment_submit": jQuery("#comment_submit").val(),
|
|
"task": jQuery("#task").val(),
|
|
"type": jQuery("#type").val(),
|
|
"iden": jQuery("#iden").val(),
|
|
"value": jQuery("#value").val(),
|
|
"user": jQuery("#user").val(),
|
|
"tab": jQuery("input#tab").val(),
|
|
"col": jQuery("#col").val(),
|
|
"tab_parent": jQuery("#tab_parent").val(),
|
|
"col_parent": jQuery("#col_parent").val(),
|
|
"child": jQuery("#child").val(),
|
|
"object_owner_id": jQuery("#object_owner_id").val(),
|
|
"object_owner": jQuery("#object_owner").val(),
|
|
"object_id": jQuery("#object_id").val(),
|
|
"object": jQuery("#object").val()
|
|
}
|
|
|
|
jQuery.ajax({
|
|
type: "POST",
|
|
url: "comments.php",
|
|
data: datasend,
|
|
success: function (returnedData) {
|
|
|
|
jQuery("#comment_submit").prop( "disabled", false );
|
|
jQuery("#comment_body").val("");
|
|
jQuery("#comment_submit").val("Post Comment");
|
|
loadXMLDoc(1);
|
|
|
|
},
|
|
dataType: "text"
|
|
});
|
|
|
|
if(document.getElementById('comment_body').value!=""){
|
|
total=document.getElementById('totalcomments').innerHTML;
|
|
total=total*1;
|
|
document.getElementById('totalcomments').innerHTML=total+1;
|
|
}
|
|
|
|
return false;
|
|
}
|
|
|
|
|
|
loadCSS = function(href) {
|
|
var cssLink = jQuery("<link>");
|
|
jQuery("head").append(cssLink); //IE hack: append before setting href
|
|
|
|
cssLink.attr({
|
|
rel: "stylesheet",
|
|
type: "text/css",
|
|
href: href
|
|
});
|
|
};
|
|
loadCSSbegin = function(href) {
|
|
var cssLink = jQuery("<link>");
|
|
jQuery("head").prepend(cssLink); //IE hack: append before setting href
|
|
|
|
cssLink.attr({
|
|
rel: "stylesheet",
|
|
type: "text/css",
|
|
href: href
|
|
});
|
|
};
|
|
|
|
function loadjsfile(href)
|
|
{
|
|
|
|
jQuery.ajax({
|
|
url: href,
|
|
cache: false,
|
|
async: true,
|
|
dataType: 'text',
|
|
success: function(data) {
|
|
jQuery('<script type="text/javascript">\n' + data + '</script>').appendTo("head");
|
|
|
|
}
|
|
});
|
|
|
|
}
|
|
|
|
|
|
function updatesuggestioncount()
|
|
{
|
|
jQuery("#comment_submit").prop( "disabled", true );
|
|
jQuery("#comment_submit").val("Sending...");
|
|
|
|
datasend={
|
|
"comment_body": jQuery("#comment_body").val(),
|
|
"comment_submit": jQuery("#comment_submit").val(),
|
|
"task": jQuery("#task").val(),
|
|
"type": jQuery("#type").val(),
|
|
"iden": jQuery("#iden").val(),
|
|
"value": jQuery("#value").val(),
|
|
"user": jQuery("#user").val(),
|
|
"tab": jQuery("input#tab").val(),
|
|
"col": jQuery("#col").val(),
|
|
"tab_parent": jQuery("#tab_parent").val(),
|
|
"col_parent": jQuery("#col_parent").val(),
|
|
"child": jQuery("#child").val(),
|
|
"object_owner_id": jQuery("#object_owner_id").val(),
|
|
"object_owner": jQuery("#object_owner").val(),
|
|
"object_id": jQuery("#object_id").val(),
|
|
"object": jQuery("#object").val()
|
|
}
|
|
|
|
jQuery.ajax({
|
|
type: "POST",
|
|
url: "misc_js.php",
|
|
data: datasend,
|
|
success: function (returnedData) {
|
|
jQuery("#comment_submit").prop( "disabled", false );
|
|
jQuery("#comment_body").val("");
|
|
jQuery("#comment_submit").val("Post Comment");
|
|
loadXMLDoc(1);
|
|
|
|
},
|
|
dataType: "text"
|
|
});
|
|
|
|
if(document.getElementById('comment_body').value!=""){
|
|
total=document.getElementById('totalcomments').innerHTML;
|
|
total=total*1;
|
|
document.getElementById('totalcomments').innerHTML=total+1;
|
|
}
|
|
|
|
return false;
|
|
} |