I've one variable error_msgs. In this variable I've to add error messages. First error message will be simply get added to the variable. Later subsequent error messages will get concatenate to the previous error message. While concatenating the later subsequent error messages each error message should be prefixed with <br/> tag to show each error message on separate line.
I tried following code for it but I'm not able to do it.
var error_msgs = "Email is invalid !";
var error_msgs += "<br/>"+"Please enter First Name !";
var error_msgs += "<br/>"+"Please enter Last Name !";
alert(error_msgs);
I got following error in my firebug console for above code :
SyntaxError: missing ; before statement
var error_msgs + = "<br/>"+"Please enter First Name !";
Could someone please help me in resolving the error?
Thanks.
varonce.