4
Well, I have a pop-up chatbox code, but it’s making the following mistake:
Uncaught Syntaxerror: Missing ) after argument list
Code:
//Variáveis a editar
var imagen_chatbox_desplegable = "http://i45.servimg.com/u/f45/17/45/19/77/chat10.png";
var posicion_chatbox_desplegable = "derecha"; // ou 'izquierda'
//Fim das variáveis a editar
document.write("<div id="chatbox_ret_cont" class="chatbox_" + posicion_chatbox_desplegable + "">");
document.write(" <div onclick="(document.getElementById('chatbox_ret').style.display=='block')?my_setcookie('chatbox_ret','0',0,0):my_setcookie('chatbox_ret','1',1,0); jQuery('#chatbox_ret').toggle('normal');">");
document.write(" <span id="chatbox_ret_online">");
document.write(" <img title="Abrir e fechar o chatbox" src="" + imagen_chatbox_desplegable + "">");
document.write(" <\/span>");
document.write(" <span id="chatbox_ret_offline"><\/span>");
document.write(" <\/div>");
document.write(" <iframe src="\/chatbox" id="chatbox_ret" name="chatbox_ret" ");
document.write(" scrolling="no" frameborder="0" marginwidth="0" marginheight="1px"");
document.write(" onload="if(cb_new){cb_start();cb_new=0;}">");
document.write(" <\/iframe>");
document.write("<\/div>");
Unfortunately, it remained the same and continues with the same error: Uncaught Syntaxerror: Missing ) after argument list / current code: http://pastebin.com/g1Xg5ftj
– Fábio Miguel
@Fábiomiguel dude, you copied the 6th line wrong, the correct is:
document.write("<div id='chatbox_ret_cont' class='chatbox_" + posicion_chatbox_desplegable + "'>");
. The 9th is also wrong:document.write(" <img title='Abrir e fechar o chatbox' src='" + imagen_chatbox_desplegable + "'>");
. And the 11th too.– DontVoteMeDown
I corrected these lines, but there were more errors, these being: /+%20imagen_chatbox_desplegable%20+ Failed to load Resource: the server responded with a status of 404 (Not Found) and Uncaught Referenceerror: cb_new is not defined / current code: http://pastebin.com/FERFL9m9
– Fábio Miguel
@Fábiomiguel expensive, probably its variable
cb_new
does not exist at the time it is used and in theimg
that you tried to concatenate the value of the variableimagen_chatbox_desplegable
In fact you called her name, so the image was not found. I have already explained the error and why of it, and also how to correct. I think it’s time for you to take a closer look at your code and try to solve this on your own, since these are basic syntax errors. I can’t stand here correcting every mistake you have, because that way you won’t learn to fix them.– DontVoteMeDown
You’re right. Anyway, thanks for your help ^^
– Fábio Miguel