I am stuck in an easy but so difficult task. I am having a string that contains a single '@' sign. The first part of string is a path of type : GroupPictures/G261-MyGroup/GU53-user2.png Second part is a name Like say USER.
Now i need to seperate these two parts using javascript and display them as html so i did something like this :
var parts=this.toString().split("@");
var myusername=parts[1];
var filenamee=parts[0].trim();
alert(filenamee);
if ($.cometChat.loginUserName == this) { //login user
sb[sb.length] = "<span class='one_test'><img style='border-radius:100%;float:left;width:35px;' src="+filenamee+" /><div class='chat_account_name'>" + myusername + "</div><div class='status_offline'></div></span><br>";
}
But the problem is image is not being displayed though the name is displayed right.I want to know am i missing some quotes to close or what is problem with it ?
Problem is with this line only :
"<span class='one_test'><img style='border-radius:100%;float:left;width:35px;' src="+filenamee+" /><div class='chat_account_name'>" + myusername + "</div><div class='status_offline'></div></span><br>"