HTML and JSP

Guys ,is there any scrolling thing in HTML.I mean i am making the user to enter same type of info atleast 20 times.But usually the entries are not more than 5.Hence I don't want the entire screen to be covered by all the 20 text fields.Is there anyway I can achiecve that.

I am using JSP to create this dynamic HTML ,hence if it is not possible thru HTML command ,then is there anyway i can do it thru JSP ?

I have searched entire HTML, THE COMPLETE REFERENCE,and I didn't come across any such thing.

Help !

Thanks.

[562 byte] By [manohar2] at [2007-9-26 2:23:33]
# 1

> Guys ,is there any scrolling thing in HTML.I mean i am

> making the user to enter same type of info atleast 20

> times.But usually the entries are not more than

> 5.Hence I don't want the entire screen to be covered

> by all the 20 text fields.Is there anyway I can

> achiecve that.

You could use a <select> element for your text fields and then a <textarea> box for the description.

Load all your description fields to "hidden" inputs and then use some simple javascript to enter the values from the text area to the "hidden" inputs for the descriptions cooresponding to the selected option.

rough example

<select name=text onchange="handleDescription(this.options[this.selectedIndex].value)">

<option value=text_1>Text 1</option>

</select>

<textarea name=description>

</textarea>

<input type=hidden name=text_1_description>

...

...

<script>

function handleDescription(selectValue) {

var thisSelectDescriptionInput = eval("document.forms[0]."+selectValue+"_description);

var thisDescriptionTextArea = document.forms[0].description;

if(thisSelectDescriptionInput.value.length()<=0) {

thisSelectDescriptionInput.value = thisDescriptionTextArea.value;

thisDescriptionTextArea.value = "";

}

}

This is a very rough example but you can get much more robust with your javascript.

Hope this helps some,

Bryan

bryanwclark at 2007-6-29 9:31:45 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...