How can I start with <a href=" and have an array element here then end with </a>?
- by Noor
The thing im trying to do right now is pulling in multiple links from a textarea,
We can pretend that a user inputs c:\pics\img01.jpg and in the next row he'll have the next imglink.
I want to pull those links, I allready have the code for that:
var entered = $('#filedir').val();
var lines = entered.split(/\r\n/);
var opttext = "";
for(var i=0;i<lines.length;i++) {
opttext += '< img src="' + lines[i] + '">< /img>';
}
?
the problem is in the output which is:
< img src="file:///C:/pics/img01.jpgc:/pics/img02.jpg">< /img>
There should be two < img> elements..
Where am I going wrong?
I've been at it for a bit over 2 hours now..