Jump to content

innerHTML


westman

Recommended Posts

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

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 by westman
Link to comment
Share on other sites

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...