|
| |
|
|
kt
Posts: 199 Joined: 11/3/2004 Status: offline
|
Carriage returns in javascript variable - 10/11/2009 14:30:15
Hi I'm using an ajax script to post form input to a database. My problem is how to get the script to recognise the carriage returns in input from a text area. Here's the part of the script which defines the variable:
var details = $("textarea#details").val();
This then becomes part of a datastring which is passed to a page where the values are inserted into the database:
var dataString = 'title=' + title + '&details=' + details;
//alert (dataString);return false;
$.ajax({
type: "POST",
url: "/includes/forms/process_post.asp",
data: dataString,
.....
If the user separates input in the textarea into paragraphs, how can I pick this up in the above script so that the carriage returns are inserted into the database? Many thanks for your help. kt
|
|
|
|
kt
Posts: 199 Joined: 11/3/2004 Status: offline
|
RE: Carriage returns in javascript variable - 10/12/2009 18:01:33
Many thanks, I'll give TinyMCE a try. kt
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts
|
|
|