wj53
asked on
carriage return in popup window is gone
I use JS popup window in cold fusion page.
when i click the text link, the notes shown up in popup window, all the carriage returns are gone.
when i use
"select notes from stunotes"
in SQL query analyzer, the carriage returns are there.
Any idea is highly appreciated. Thanks.
WJ53
when i click the text link, the notes shown up in popup window, all the carriage returns are gone.
when i use
"select notes from stunotes"
in SQL query analyzer, the carriage returns are there.
Any idea is highly appreciated. Thanks.
WJ53
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
in the textarea the carriage return is taken care of automaticlly. But after i add the textarea in "popnote.cfm", it looks not pretty at all. Outer layer is popup window, inside is iframe, inside is textarea. I know little knowledge about JS. do you how to get rid of iframe and only leave textarea in the window? Thanks.
//notelist.cfm
<script>
function showPopupWindow(url, top, left, width, height) {
....
newwin.document.write('<if rame width='+(width-10) +' height='+(height-50)+' src='+url+'></iframe>')
newwin.document.write('<br ><center>< a href="#" onClick ="window.close();return false;">')
newwin.document.write('<im g src="images/close.gif" border="0"></a></center>')
...
</script>
<html>
<body>
<a href="http://www.mysite.com/popnote.cfm?notekey=#notekey#"
onClick="JavaScript:showPo pupWindow( this.href, 100,100,50 0,600); return false">#Trim(smallnote)#&n bsp;</a>
</body>
</html>
//popnote.cfm
<html>
<body>
<body>
<cfquery>...
</cfquery>
<cfoutput query="FULLNOTE">
<textarea name="textBoxDesc" rows="25" cols="38">#note#</textarea >
</cfoutput>
</body>
</html>
wj53
//notelist.cfm
<script>
function showPopupWindow(url, top, left, width, height) {
....
newwin.document.write('<if
newwin.document.write('<br
newwin.document.write('<im
...
</script>
<html>
<body>
<a href="http://www.mysite.com/popnote.cfm?notekey=#notekey#"
onClick="JavaScript:showPo
</body>
</html>
//popnote.cfm
<html>
<body>
<body>
<cfquery>...
</cfquery>
<cfoutput query="FULLNOTE">
<textarea name="textBoxDesc" rows="25" cols="38">#note#</textarea
</cfoutput>
</body>
</html>
wj53
ASKER
I find out if i use textarea in the popup window, it's a temptation to add something or modifiy it there. Eventhough any modification is discarded, i think i have to SQl solution.
the note is saved as text data type. how to add chr(13) for each carriage return?
the note is saved as text data type. how to add chr(13) for each carriage return?
ASKER
I went to SQL forum and found answer to replace this trick text date type with <BR>.
If anyone is interested in the answer, pls go
https://www.experts-exchange.com/jsp/qManageQuestion.jsp?ta=mssql&qid=20182000
FranzRinkleff, i will pass my points to you in a few days. Just don't like to see my points decrease too much in a day. :-)
If anyone is interested in the answer, pls go
https://www.experts-exchange.com/jsp/qManageQuestion.jsp?ta=mssql&qid=20182000
FranzRinkleff, i will pass my points to you in a few days. Just don't like to see my points decrease too much in a day. :-)
On 9/21/01 you said that you would pass ponts to FranzRinkleff in a few days, but have not done so yet. Please do, accept his comments and convert it to the Accepted Answer to then grade and close this (A grade, I hope. Anytime you choose to grade with less than an A grade, it is important to tell the experts why. They take great pride in providing excellent support).
Moondancer
Community Support Moderator @ Experts Exchange
Moondancer
Community Support Moderator @ Experts Exchange
Thanks.
Moondancer
Community Support Moderator @ Experts Exchange
Moondancer
Community Support Moderator @ Experts Exchange
ASKER
you understand it correctly. That's exactly what the problem is.
I will try the <textarea> first. if I draw the textarea the same size as the window, it seems like it should fit the window.
Thanks,
WJ53