Penso che l'errore sia qui ma non riesco a trovarlo...
potresti dirmi dove correggere ?
codice:
var last_upload_description_value = "";
function licence() {
window.open('licence.htm',LangLicence,'scrollbars=yes, resizable=no, width=600, height=600, status=no, location=no, toolbar=no');
}
function popup_comments(gid) {
window.open('feedback.php?gid='+gid,'','scrollbars=yes, resizable=no, width=600, height=600, status=no, location=no, toolbar=no')
}
function popup_retrogame(glnk) {
window.open(glnk,'','scrollbars=yes, resizable=no, width=600, height=690, status=no, location=no, toolbar=no, menubar=no')
}
function check_licence() {
document.getElementById('Submit').disabled = !document.getElementById('licence').checked;
}
function download_click() {
var mySearch = new RegExp("download", "i");
document.location.href = document.location.href+(document.location.href.search(mySearch) == -1 ? "&download=1" : "");
}
function check_signup_form() {
if (document.signup.username.value == "" || document.signup.password == "" || document.signup.email.value == "" || document.signup.password.value != document.signup.confirmpassword.value || document.signup.email.value != document.signup.confirmemail.value) {
alert(LangSignupFormError);
return false;
} else
return true;
}
function full_screenshot() {
var url = document.getElementById("Preview").src;
var newImg = new Image();
var width, height;
newImg.src = url;
height = newImg.height+5;
width = newImg.width+5;
window.open(url, "Screenshot", "scrollbars=no, resizable=no, status=no, width="+width+", height="+height+", location=no, toolbar=no");
}
function only_numeric(string) {
var i;
var b9 = "9".charCodeAt(0);
var b0 = "0".charCodeAt(0);
var bv = ".".charCodeAt(0);
for (i=0; i<string.length; i++)
if ((string.charCodeAt(i) > b9 || string.charCodeAt(i) < b0) && string.charCodeAt(i) != bv)
return false;
return true;
}
function check_upload_description_field_length(description) {
var content;
var parsing_html;
content = description.value;
parsing_html = false;
len = 0;
for (i = 0; i < content.length; i++) {
if (content.charCodeAt(i) == "<".charCodeAt(0))
parsing_html = true;
else if (content.charCodeAt(i) == ">".charCodeAt(0))
parsing_html = false;
else if (!parsing_html)
len++;
}
return len;
}
function check_upload_description_field(description) {
var content;
var words;
var parsing_html;
content = description.value;
parsing_html = false;
toparse = "";
for (i = 0; i < content.length; i++) {
if (content.charCodeAt(i) == "<".charCodeAt(0))
parsing_html = true;
else if (content.charCodeAt(i) == ">".charCodeAt(0))
parsing_html = false;
else if (!parsing_html)
toparse += content.substring(i, i+1);
}
words = toparse.split(" ");
for (i = 0; i < words.length; i++) {
if (words[i].length > 25)
return false;
}
if (toparse.length > DescriptionMaxLength)
return false;
return true;
}
function upload_description_add_link(description) {
var a;
var value;
a = prompt(LangLinkInsertLink, document.location.href);
value = prompt(LangLinkInsertText, "Text");
description.value += "" + value + "";
return true;
}
function update_upload_description_counter(description) {
var len = check_upload_description_field_length(description);
if (len > DescriptionMaxLength)
document.getElementById("description_field").rows[0].cells[1].innerHTML = "Limite raggiunto!";
else
document.getElementById("description_field").rows[0].cells[1].innerHTML = "" + (DescriptionMaxLength-len) + " " + LangCharacters;
}
function upload_check_weight() {
if (document.upload.uweight[0].checked) {
document.upload.weight.value = "0";
document.upload.weight.disabled = true;
} else
document.upload.weight.disabled = false;
}
function check_comment_field() {
if (!check_upload_description_field(document.comment.leave)) {
alert(LangCommentOverflow);
return false;
}
return true;
}