java - Error in my javascript file -


code:

  <%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %> 

error message:

multiple markers @ line

  • syntax error on tokens, delete these tokens
  • syntax error on tokens, ( expected instead

code:

var tabmessages = new array(); 

error message:

syntax error, insert ")" complete expression

my js file:

<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>  var tabmessages = new array();  tabmessages['errors.invalid']='<bean:message key="errors.invalid" arg0="{0}" arg1="{1}" arg2="{2}" arg3="{3}" arg4="{4}" />'; tabmessages['errors.maxlength']='<bean:message key="errors.maxlength" arg0="{0}" arg1="{1}" arg2="{2}" arg3="{3}" arg4="{4}" />'; tabmessages['errors.minlength']='<bean:message key="errors.minlength" arg0="{0}" arg1="{1}" arg2="{2}" arg3="{3}" arg4="{4}" />'; tabmessages['errors.range']='<bean:message key="errors.range" arg0="{0}" arg1="{1}" arg2="{2}" arg3="{3}" arg4="{4}" />'; tabmessages['errors.required']='<bean:message key="errors.required" arg0="{0}" arg1="{1}" arg2="{2}" arg3="{3}" arg4="{4}" />'; tabmessages['errors.byte']='<bean:message key="errors.byte" arg0="{0}" arg1="{1}" arg2="{2}" arg3="{3}" arg4="{4}" />'; tabmessages['errors.date']='<bean:message key="errors.date" arg0="{0}" arg1="{1}" arg2="{2}" arg3="{3}" arg4="{4}" />'; tabmessages['errors.double']='<bean:message key="errors.double" arg0="{0}" arg1="{1}" arg2="{2}" arg3="{3}" arg4="{4}" />'; tabmessages['errors.float']='<bean:message key="errors.float" arg0="{0}" arg1="{1}" arg2="{2}" arg3="{3}" arg4="{4}" />'; tabmessages['errors.integer']='<bean:message key="errors.integer" arg0="{0}" arg1="{1}" arg2="{2}" arg3="{3}" arg4="{4}" />'; tabmessages['errors.long']='<bean:message key="errors.long" arg0="{0}" arg1="{1}" arg2="{2}" arg3="{3}" arg4="{4}" />'; tabmessages['errors.short']='<bean:message key="errors.short" arg0="{0}" arg1="{1}" arg2="{2}" arg3="{3}" arg4="{4}" />'; tabmessages['errors.creditcard']='<bean:message key="errors.creditcard" arg0="{0}" arg1="{1}" arg2="{2}" arg3="{3}" arg4="{4}" />'; tabmessages['errors.email']='<bean:message key="errors.email" arg0="{0}" arg1="{1}" arg2="{2}" arg3="{3}" arg4="{4}" />'; tabmessages['errors.numeric']='<bean:message key="errors.numeric" arg0="{0}" arg1="{1}" arg2="{2}" arg3="{3}" arg4="{4}" />'; tabmessages['errors.filetype']='<bean:message key="errors.filetype" arg0="{0}" arg1="{1}" arg2="{2}" arg3="{3}" arg4="{4}" />'; tabmessages['errors.accord.nonvalide']='<bean:message key="affichagepaa.erreur.accord.nonvalide" arg0="{0}" arg1="{1}" arg2="{2}" arg3="{3}" arg4="{4}" />'; tabmessages['errors.telephone']='<bean:message key="errors.telephone" arg0="{0}" arg1="{1}" arg2="{2}" arg3="{3}" arg4="{4}" />'; tabmessages['errors.incorrectyear']='<bean:message key="error.incorrectyear" arg0="{0}" arg1="{1}" arg2="{2}" arg3="{3}" arg4="{4}" />';   tabmessages['errors.datecumulannueldepassee']='<bean:message key="declaration.saisiecarealise.validationcumulannuel.possiblealabonnedate.erreur" arg0="{0}" arg1="{1}" arg2="{2}" arg3="{3}" arg4="{4}" />'; tabmessages['errors.datecumulannuelencours']='<bean:message key="declaration.saisiecarealise.validationcumulannuel.dateok.erreur" arg0="{0}" arg1="{1}" arg2="{2}" arg3="{3}" arg4="{4}" />'; tabmessages['errors.datecumulannuelnonatteinte']='<bean:message key="declaration.saisiecarealise.validationcumulannuel.datedepassee.erreur" arg0="{0}" arg1="{1}" arg2="{2}" arg3="{3}" arg4="{4}" />'; tabmessages['errors.cumulannueldejavalide']='<bean:message key="declaration.saisiecarealise.validationcumulannuel.dej�valider.erreur" arg0="{0}" arg1="{1}" arg2="{2}" arg3="{3}" arg4="{4}" />';  tabmessages['negociation.suppression.ristourne']='<bean:message key="negociation.suppression.ristourne" arg0="{0}" arg1="{1}" arg2="{2}" arg3="{3}" arg4="{4}" />'; tabmessages['changement.champapplication.ristourne']='<bean:message key="negociation.ajoutristourne.changement.champapplication.ristourne" arg0="{0}" arg1="{1}" arg2="{2}" arg3="{3}" arg4="{4}" />'; tabmessages['matrice.suppression.familleasuivre']='<bean:message key="matrice.suppression.familleasuivre" arg0="{0}" arg1="{1}" arg2="{2}" arg3="{3}" arg4="{4}" />';  tabmessages['alerte.suppression.simple']='<bean:message key="alerte.suppression.simple" arg0="{0}" arg1="{1}" arg2="{2}" arg3="{3}" arg4="{4}" />'; tabmessages['alerte.suppression.complexe']='<bean:message key="alerte.suppression.complexe" arg0="{0}" arg1="{1}" arg2="{2}" arg3="{3}" arg4="{4}" />';  tabmessages['cumul.annuel.temporaire']='<bean:message key="cumul.annuel.temporaire" arg0="{0}" arg1="{1}" arg2="{2}" arg3="{3}" arg4="{4}" />';  tabmessages['calcul.retrocession.type.retrocession.differente']='<bean:message key="calcul.retrocession.type.retrocession.differente" arg0="{0}" arg1="{1}" arg2="{2}" arg3="{3}" arg4="{4}" />';   function getmessage(key, arg0, arg1, arg2, arg3, arg4) {     var res = tabmessages[key];     if (arg0 != undefined) {         res = res.replace(/\{0\}/g, arg0);     }     if (arg1 != undefined) {         res = res.replace(/\{1\}/g, arg1);     }     if (arg2 != undefined) {         res = res.replace(/\{2\}/g, arg2);     }     if (arg3 != undefined) {         res = res.replace(/\{3\}/g, arg3);     }     if (arg4 != undefined) {         res = res.replace(/\{4\}/g, arg4);     }     return res; } 

enter image description here

what wrong ..?

mixing jsp , js can and/or produce unexepected results. 1 way collecting jsp related variables in 1 place , factoring out non-jsp codes pure/static javascript files.


Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

javascript - Get parameter of GET request -

javascript - Twitter Bootstrap - how to add some more margin between tooltip popup and element -