Hi,
I am rather certain that \n is a carriage return line feed in Javascript
Make certain you try this in a straight html page - (NOT one generated by php)
Because..... I think if you're using php to echo or create your javascript you have to 'escape' the backslash ............. kind of like
echo "alert('This is the first line \nAnd this is the second');";
Hope that helps!!