RupertA
asked on
Preserve carriage returns in a javascript variable
I want to be able to preserve carriage returns in a javascript variable. I have a javascript variable "notes" which if I do
alert(notes);
the alert box shows that the carriage returns in the variable are in place. Good. The problem is that I need to send this variable onto another html page. I do this with this following code (I don't have php on the server so all of this being done with javascript)
window.open("checkalert/ch eckalert.h tml?notesi nput="+not es,"_newta b");
On checkalert.html, I retreive notesinput into a javascript variable and do an alert. Now I have lost the carriage returns which were in the variable notes on the previous screen.
Could somebody please help me with some javascript code on how to keep the carriage returns for when the data lands on checkalert.html
Thanks
alert(notes);
the alert box shows that the carriage returns in the variable are in place. Good. The problem is that I need to send this variable onto another html page. I do this with this following code (I don't have php on the server so all of this being done with javascript)
window.open("checkalert/ch
On checkalert.html, I retreive notesinput into a javascript variable and do an alert. Now I have lost the carriage returns which were in the variable notes on the previous screen.
Could somebody please help me with some javascript code on how to keep the carriage returns for when the data lands on checkalert.html
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER