Click to See Complete Forum and Search --> : display input in a readonly scroll box


atong
12-04-2003, 12:38 PM
Hi all,

I'd like to write a script that will display a text input in a readonly scroll box. The idea is having an input box below a scroll box, user can add a value by inputing the string in the input box, and click the ADD buttom. The value will then be displayed in the scroll box. Also, user can delete or modify the input values by selecting / clicking the values shown in the scroll box. The selected value will be shown in the input box, users can then modify or delete the values from the input box, and click the MODIFY or DELETE button to execute the transaction. The changes will be reflected in the scroll box after they have been successfully executed. Does anyone have any example codes on how to do this? Any help will be greatly appreciated!

thanks,

Annie

TheBearMay
12-04-2003, 01:03 PM
Adding should be simple enough, but I'm going to have to think on the deletion. Let's say the input box is named TextIN and the other box is named DispOnly, to add text it is then as simple as:

DispOnly.value =+ TextIN.value

Pittimann
12-04-2003, 01:30 PM
Hi!

With js, the deletion or modification of a selection in the textarea can only be done, if the user is using IE...

Cheers - Pit

edit: sorry, didn't see that early enough - small typo in the code above (should be "DispOnly.value += TextIN.value")

Khalid Ali
12-04-2003, 08:58 PM
Originally posted by Pittimann
Hi!

With js, the deletion or modification of a selection in the textarea can only be done, if the user is using IE...


Thats not true(sorry)
You can do it with NS6+(or mozilla based) browsers as well