In javascript I have an array like
psi=["www.google.com","www.facebook.com","www.collegehumor.com"]
I want to turn it to a formatted string like
var final=<a href="www.google.com" target="_blank">www.google.com</a></br>,<a href="www.facebook.com" target="_blank">www.facebook.com</a></br>,<a href="www.collegehumor.com" target="_blank">www.collegehumor.com</a></br>
so I can send from server to client something like
//websockets, btw...
connection.send('Search Results'+t_name+'</br>Links'+final+'</br>');
and it will render just the working links.
Something like
www.google.com
www.facebook.com
www.collegehumor.com
I know there is the toString(). But no luck with that. I cant make it create working links.
I tried to implement a for inside the connection.send but Dreamweaver says there is a syntax error. That's why I try to convert the array to formatted string.
Any advise?
Thanks
+=and then pass it?var final="<a href=\"http://www.google.com\" target=\"_blank\">www.google.com</a>, ...";"by simply wrapping the enterfinalstring value with'.