Hello everyone!
I'm really annoyed about a problem I've been having for a long time. I've been searching and spending lots of hours trying to solve that but nothing.
The problem:
Sometimes, when I write some javascrpit code in eclispe and after that I try to run it on the browser (every browsers) it doesn't run properly, an example:
Code:
function util(){}
function util.alertProblem(problem){
var x = navigator;
alert("La espiral fractal no soporta tu navegador,\n" +
"por favor, para ayudar el buen desarrollo de la web\n" +
"conacta con 'dev@laespiralfractal.es' con el mensage:\n" +
"Problema: " + problem +
"\nDatos de tu navegador:" +
"\nCodeName=" + x.appCodeName +
"\nName=" + x.appName +
"\nVersion=" + x.appVersion +
"\nPlatform=" + x.platform +
"\nUA=" + x.userAgent +
" \n\n ˇˇMUCHAS GRACIAS POR TU COLABORACIÓN!!.");
}
And I try to load the page and firefox gets this error:
Quote:
missing ( before formal parameters
function util.alertProblem(problem){\n
|
I don't know the reason, sometimes it fixes itself, but I really want to know how not to get that.
Could someone help me?
{SEMI-SOLVED}
I can run properly the script doing it like that:
Code:
var util = {};
util.alertProblem = function(problem)
{
var x = navigator;
alert("La espiral fractal no soporta tu navegador,\n" +
"por favor, para ayudar el buen desarrollo de la web\n" +
"conacta con 'dev@laespiralfractal.es' con el mensage:\n" +
"Problema: " + problem +
"\nDatos de tu navegador:" +
"\nCodeName=" + x.appCodeName +
"\nName=" + x.appName +
"\nVersion=" + x.appVersion +
"\nPlatform=" + x.platform +
"\nUA=" + x.userAgent +
" \n\n ˇˇMUCHAS GRACIAS POR TU COLABORACIÓN!!.");
}