I have a Javascript function declared like this( an example from some site):
function writeConsole(content) {
top.consoleRef=window.open('','myconsole',
'width=350,height=250'
+',menubar=0'
+',toolbar=1'
+',status=0'
+',scrollbars=1'
+',resizable=1')
top.consoleRef.document.writeln(
'<html><head><title>Console</title></head>'
+'<body bgcolor=white onLoad="self.focus()">'
+content
+'</body></html>'
)
top.consoleRef.document.close()
}

Now in my ASP code, i look up some database data and display it in a table, however one of the entries in the table can be very long and in multiple lines, so in that case i want to place a link or similar to pop up a window with the multiline text.

I've tried to do it like this:
"<td><a href=""javascript:writeConsole('" & value & "')"">Show</a></td>"

Ive also tried to remove all newlines etc first, just to check if that was the issue:
value = replace(value,"'","\'")
value = replace(value,Chr(10),"|")
value = replace(value,Chr(11),"|")
value = replace(value,Chr(12),"|")
value = replace(value,vbCrLf,"|")

But that didnt help either. However replacing the string with some test value does work.
Im worried that it might be due to the fact that the argument is so long(its about 30-40 lines)? If that is the case, would it help to use an onclick action to call the script instead?
Any help on this would be greatly appreciated, as its pretty frustrating. Other (pref. client side)ideas on doing this that doesnt involve requering the database(which is what im currently doing) are also welcome.