+ Start a Discussion
nishanth0208nishanth0208 

"Read More" link/button for a text field to show/hide complete text field's content

Hi All,

 

        I have one long text field in my visualforce page. In that i need to display few text(say 200 chars) only and i need to provide READMORE link/button which would show me the complete content in that text field. I need to achieve this shortly! 

Please provide me the idea/code how to achieve this. Any code/links will be added advantage to me! Help me Out!

 

Tons of Thanks,

Nishanth.

Best Answer chosen by Admin (Salesforce Developers) 
nishanth0208nishanth0208

<!DOCTYPE html>

<html>

<head>

<script src="http://code.jquery.com/jquery-latest.min.js"></script>

</head>

<body>

<button>Toggle</button>

<div>Hello</div> <div style="display: none">Good Bye</div>

<script> $("button").click(function () { $("div").toggle(); }); </script>

</body>

</html>

 

 

All Answers

Anand@SAASAnand@SAAS

You can use Javascript and change the "Style" attribute of the text field to increase the width,height etc. You should find examples of these by doing a search on google.

nishanth0208nishanth0208

can u explain me with short example?

nishanth0208nishanth0208

<!DOCTYPE html>

<html>

<head>

<script src="http://code.jquery.com/jquery-latest.min.js"></script>

</head>

<body>

<button>Toggle</button>

<div>Hello</div> <div style="display: none">Good Bye</div>

<script> $("button").click(function () { $("div").toggle(); }); </script>

</body>

</html>

 

 

This was selected as the best answer