aspose file tools*
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 Spring in Action this week in the Spring 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: 244

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: 61433
    
  67

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: 244

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: 61433
    
  67

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: 244

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: 244

My question is i want to limit the number of charecters to display one the screen from long screen
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Display text upto some extend?