Solved

Form <Input ...> display problem

Posted on 2002-04-07
2
161 Views
Last Modified: 2012-05-04
Hi

I have problem with a jsp program which display
a form's input field.

See below :-

out.print("<td><input type=text size=60 name=description disabled value=" + desc + ">" + "</td>");          

The String field <desc> contains value "Question 3 header".
But when the web page displayed, it shown as "Question" instead of "Question 3 header".

Pls advice what is wrong ?

Thanks & Rgds
Heng03

                                   

0
Comment
Question by:heng03
2 Comments
 
LVL 3

Accepted Solution

by:
msterjev earned 100 total points
Comment Utility
Increase the size of text field and specify the width of the column:
<td width=200><input type=text size=120 .....
0
 

Author Comment

by:heng03
Comment Utility
Hi  msterjev

Your answer did not work.

I debug the jsp program & found the error is due to jsp handling String variable.
The solution is to embed the variable with "'".

eg
before solution :-
out.print("<td><input type=text size=60 name=description disabled value=" + desc + ">" + "</td>");  
       

After solution :-
out.print("<td>" + "<input type=text size=60 name=description disabled value=" + "'" + desc + "'" + ">" + "</td>");  
       
Anyway thanks for your help.

Rgds
Heng03





0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.

743 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