westman Posted July 15, 2013 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? Link to comment Share on other sites More sharing options...
Ingolme Posted July 15, 2013 Share Posted July 15, 2013 What's causing the character limit? Link to comment Share on other sites More sharing options...
westman Posted July 15, 2013 Author 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 Link to comment Share on other sites More sharing options...
justsomeguy Posted July 15, 2013 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. Link to comment Share on other sites More sharing options...
westman Posted July 15, 2013 Author Share Posted July 15, 2013 it was line break. thank you. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now