User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the JavaScript / DHTML / AJAX section within the Web Development category of DaniWeb, a massive community of 456,481 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,831 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JavaScript / DHTML / AJAX advertiser: Lunarpages Web Hosting

Java Script new line

Join Date: Dec 2006
Posts: 17
Reputation: pojke is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
pojke pojke is offline Offline
Newbie Poster

Java Script new line

  #1  
Feb 5th, 2007
Hi.
Perhaps a lot of you heart this problem, but i can't find a solution.
Java Script is crashing when see \n sign.
I have a lot of functions like this:
  1. function drawDocumentMainRowColor1(unique, content, align, padding, color) {
  2. drawDocumentHTML += '<tr class="stdTab" bgcolor="#' + color + '"><td>&nbsp;</td><td style="padding: ' + padding + 'px 10px;" colspan="2" align="' + align + '">' + content + '</td></tr>';
  3. }

..where content is any string. Now if in string appear \n or \r sign page is dead. (JS error)

T U for any help
AddThis Social Bookmark Button
Reply With Quote  
All times are GMT -4. The time now is 2:55 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC