Hi,

Can some one tell me where my program is failing?

My goal is to make it work to:

1) Convert to html link
2) Insert paragraph tags

Thank you so much for your help

Code:
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js" language="JavaScript" ></script>
Code:
function go() {
		$("#output").val(replaceURLWithHTMLLinks($("#input").val()));
		return false;
	}
	function replaceURLWithHTMLLinks(text) {
		var exp = /(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/gi;
		return text.replace(exp,'<a href="$1">$1</a>'); 
	}
	$(document).ready(function() {
		$("#input").keyup(function(event) {
			go();
		});
		$('#input').bind('input propertychange', function() {
			go();
		});
	});		
	jQuery(function($) {  
  	var output = $("#output"),
    input = $("#input");  
  	input.on("keypress keyup", function() {
    output.html(input.val().replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/\r?\n/g, '<p>'));
  	});  
  	function display(msg) {
    $("<\p>").html(msg).appendTo(document.body);
  	}
	});
the rest is:

Code:
 <form name="subform" onSubmit="return go();">
                <textarea id="input" name="oldText" cols="120" rows="30" wrap="virtual"></textarea>
                <br /><br />
                <textarea id="output" name="newCode" cols="120" rows="30" wrap="virtual"></textarea>                
            </form>