This is the code I have in JavaScript:
$(function() { $("#test1").click(function(e) { e.preventDefault(); var newLine = "%0D%0A&