The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Detecting text outside of text boxes
tooPrime
post Feb 24 2011, 02:44 PM
Post #1





Group: Members
Posts: 1
Joined: 24-February 11
Member No.: 13,969



I have a text box on a website that I need to fill with headlines from an RSS feed. I've gotten code that can take the information from an RSS, but my problem is the length of the headlines are quite volatile, so depending on the headlines the box will be extremely empty or the words will bleed outside of the box. There is a parameter in the function that reads the RSS feed that specifies how many headlines to display. Is there some way I can increase this number until the words spill out of the box and then go one less? My programing prowess is subpar so I'm not even sure how to search a tutorial to do this. If anyone can tell me how or reference a tutorial that would help I would be very happy.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Christian J
post Feb 24 2011, 03:24 PM
Post #2


.
********

Group: WDG Moderators
Posts: 9,656
Joined: 10-August 06
Member No.: 7



You might compare values for height and scrollHeight, if the latter is larger it implies overflowing content (though I recall it's a bit random at times).

See also http://msdn.microsoft.com/en-us/library/ms533024.aspx
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
2 User(s) are reading this topic (2 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 25th April 2024 - 09:46 PM