This issue is really frustrating. The function is throwing this error message:
Uncaught ReferenceError: Invalid left-hand side in assignment
Can someone please help me identify where the error is occurring?
function ok()
{
if (document.getElementById('titulo')='') {
AbreSnackBar('You have to give this piece a title','red');
exit();
}
var data=
'titulo=' + document.getElementById('titulo').value +
'&plantilla=' + document.getElementById('plantilla').value +
'&pags=' + document.getElementById('pags').value +
'&genero=' + document.getElementById('gen').value +
'&comp_real=' + document.getElementById('comp_orig').value +
'&ano=' + document.getElementById('ano').value +
'&up_im1=' + document.getElementById('up_im1').value +
'&up_im2=' + document.getElementById('up_im2').value +
'&up_im3=' + document.getElementById('up_im3').value +
'&up_ref=' + document.getElementById('up_ref').value +
'&video=' + document.getElementById('link').value +
'&descr=' + document.getElementById('descr').value +
'&descr_ing=' + document.getElementById('descr_ing').value +
'&minutos=' + document.getElementById('minutos').value +
'&dificultad=' + document.getElementById('dif').value +
'&up_PDF=' + document.getElementById('up_PDF').value +
'&up_RAR=' + document.getElementById('up_RAR').value +
'&up_MUS=' + document.getElementById('up_MUS').value +
'&up_SIB=' + document.getElementById('up_SIB').value +
//'&tags=' + document.getElementById('tags').value +
'&modo=' + document.getElementById('modo').value +
'&id_concurso=' + document.getElementById('id_concurso').value +
'&copias_min=' + document.getElementById('copias_min').value;
AbreSnackBar('Wait...');
$.ajax({
type: "POST", url: "acc_sube_obra.php", data: data ,
success: function (data)
{
alert(data);
switch (data.trim())
{
case '0':
AbreSnackBar('An error ocurred','red');
break;
default: //id
AbreSnackBar('Done!','green');
window.location.href = 'http://www.aboutscores.com/obra_subida.php?id='+ data.trim();
}
}
});
}
It seems like I may be trying to assign a new value within a function result, although I can't seem to locate where that's happening.
I chose not to include the code for the AbreSnackBar function as it functions correctly and isn't relevant to this issue.