This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
The moose likes JSP and the fly likes Display text upto some extend? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Display text upto some extend?" Watch "Display text upto some extend?" New topic
Author

Display text upto some extend?

mallikarjun dontamsetti
Ranch Hand

Joined: Mar 18, 2011
Posts: 242

I am practicing JSP and i want to know how to display a text upto some extend (like "Last Post" in JavaRanch) after that dots (.....) can any one tell me please.
thanks in advance.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60077
    
  65

You'll need to explain more clearly what you are trying to accomplish.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
mallikarjun dontamsetti
Ranch Hand

Joined: Mar 18, 2011
Posts: 242

I am developing an application in user grid page the user will see like bellow formate

user name Address courses Description
---------------------------------------------------------------------
1. wwww jdsf,sdjf,kds java sdkjfffffffff jdsf dsjfsd hf dsj fhjdfsf hjsdf sjd fsdfjdsfdsjf sdfsjdfjsdf sdf dsjfsdf sdfjdsfs sdnsd fsdf ds.
2. sjdfjsk sdkj,sjdfsdj .net dsfsdkf sd fsdf ds f sdf s df sdf dsf hds fh dsfjsdfndsa f sadf nsdfas df s dfsd fas df sd f dsf dsf ds f sdfk ks df sdjk.



like the above but i want to display description upto some extend after that i want to add some dots (....) when some one clicks on that particular user it will display all the description.
how can i achieve that. (Now my code is displaying all the description and when some one clicks on it is displaying full data of user)
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60077
    
  65

Ah, now I think I understand. You can use JSP to set up the HTML and JavaScript markup, but you'll use JavaScript to manipulate CSS to show and hide the "extended" text.
mallikarjun dontamsetti
Ranch Hand

Joined: Mar 18, 2011
Posts: 242

Please give me some examples or links. and the data is comming from data base.
thanks in advance
mallikarjun dontamsetti
Ranch Hand

Joined: Mar 18, 2011
Posts: 242

My question is i want to limit the number of charecters to display one the screen from long screen
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Display text upto some extend?
 
Similar Threads
information for extending the date of voucher
format double precision in Jtable
executing DOS commands in java!!!
Format JTable.
describing the table!!!...