How are they sending links - Well-formed anchor tags or just URL in regular text?
Try this:
Code:<script> function sendFunction() { var userName = document.getElementById("myUserName").value; var userinput = document.getElementById("myInput").value; var imagesrc = document.getElementById("baseimage"); var img = $('<img width=" =100px;" height=" 100px">').attr('src', imagesrc.value); $('#conDivID').append("<span style='color: red'>" + userName + ': </span>'); $('#conDivID').append("<span style='color: blue'>" + embedUrls(userinput) + ' </span>'); $('#conDivID').append('</br>'); $('#conDivID').append("<span class='timeSpan'>" + timestring + '</span>'); $('#conDivID').append('</br>'); $('#conDivID').append(img); $('#conDivID').append('</br>'); } function embedUrls(text) { var urlRe = /(https?:\/\/[^\s]+)/g; return text.replace(urlRe, '<a href="$1">$1</a>'); } </script>




icon on the left of the post.
Reply With Quote