westman 10 Posted July 15, 2013 Report Share Posted July 15, 2013 hi all, I am using ... function iteminfo(theinfo) {var infoitem1 = theinfo;outinfoitem = document.getElementById("info_of_news");outinfoitem.innerHTML = infoitem1;} to pass a string (readable text for users) but the string i am passing has a character limit. how do i up the limit so i can send a paragraph of text instead of a sentence? Quote Link to post Share on other sites
Ingolme 1,020 Posted July 15, 2013 Report Share Posted July 15, 2013 What's causing the character limit? Quote Link to post Share on other sites
westman 10 Posted July 15, 2013 Author Report Share Posted July 15, 2013 (edited) i can not fine the problem. i am outputting from php while loop... $list_body .= '<div class="boxHeader" align="left"> <a href="#" title="News" onclick="return false" onmousedown="javascript:toggleNewsContainers('view_news'); javascript:itemname('' . $news_title_3 . ''); javascript:iteminfo('' . $news_info_3 . '');">' . $news_title_3 . '</a></div><br />';} it can output sentences fine but paragraphs is a problem. Edited July 15, 2013 by westman Quote Link to post Share on other sites
justsomeguy 1,135 Posted July 15, 2013 Report Share Posted July 15, 2013 There's no character limit in Javascript. Maybe the text contains line breaks, which you need special handling for in Javascript, you can't have a line break in the middle of a string. You would need to replace line breaks with a "n" sequence in the text. Maybe you're running into a character limit in a field in a database. It's hard to guess what the problem might be, but Javascript doesn't have a character limit for strings. Quote Link to post Share on other sites
westman 10 Posted July 15, 2013 Author Report Share Posted July 15, 2013 it was line break. thank you. Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.