Solved

Can an IF statement handle this textarea?

Posted on 2004-08-01
4
186 Views
Last Modified: 2010-04-01
I have a form page that has a textarea field in it (example below).
Not all of the records need to have more than 20 rows for the textarea.
So on the ones that are less than 20 rows, I want to not show the scroll bar for the textarea field.  (just like my example below)
However, I do want to show the scroll bar for records with textareas larger than 20 rows.

Is it possible to write this IF statement in JSP to handle this?


<textarea style="overflow:hidden" wrap=hard cols="120" rows="20"><%= REQTEXT %></textarea>
0
Comment
Question by:g118481
  • 2
4 Comments
 
LVL 8

Assisted Solution

by:RozanaZ
RozanaZ earned 50 total points
ID: 11691261
Do you mean this:

<textarea <%if (rowsNumner <= 20){%><%="style='overflow:hidden'"%><%}%> wrap=hard cols="120" rows="20">"><%= REQTEXT %></textarea>
0
 
LVL 35

Accepted Solution

by:
TimYates earned 50 total points
ID: 11691620
or:

<textarea <% rowsNumner <= 20 ? "style='overflow:hidden'" : "" %> wrap="hard" cols="120" rows="20">"><%= REQTEXT %></textarea>
0
 
LVL 1

Author Comment

by:g118481
ID: 11693345
Both work great, so I am splitting the points.
Is this OK with you?
0
 
LVL 8

Expert Comment

by:RozanaZ
ID: 11693376
Sure, it's ok :)
Thanks
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
what is stuck threads? 3 97
java cyclic graphs 15 201
love6 challenge java 31 129
how to add new optional parameter to JSP 1 27
Note: This is the third blog post in a series on email clearinghouses (https://www.xmatters.com/alert-management/blog-email-has-failed-us?utm_campaign=70138000000ydLoAAI&utm_source=exex&utm_medium=article&utm_content=blog-post).   We’ve been talki…
Some code to ensure data integrity when using macros within Excel. Also included code that helps secure your data within an Excel workbook.
Hi friends,  in this video  I'll show you how new windows 10 user can learn the using of windows 10. Thank you.
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now