Solved

Can an IF statement handle this textarea?

Posted on 2004-08-01
4
184 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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
rebasing and merging used in SCM 1 63
bean mapper frameworks 5 56
Set up Wildfly 10 8 320
Books that can get me started on JAVA 2 54
In this step by step tutorial with screenshots, we will show you HOW TO: Enable SSH Remote Access on a VMware vSphere Hypervisor 6.5 (ESXi 6.5). This is important if you need to enable SSH remote access for additional troubleshooting of the ESXi hos…
In  today’s increasingly digital world, managed service providers (MSPs) fight for their customers’ attention, looking for ways to make them stay and purchase more services. One way to encourage that behavior is to develop a dependable brand of prod…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

705 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

19 Experts available now in Live!

Get 1:1 Help Now