changing the text displayed when a item in a listbox

XML, Perl, Python, and other languages can be discussed here, even if it isn't PHP (We might forgive you).

Moderator: General Moderators

Post Reply
psychotomus
Forum Contributor
Posts: 487
Joined: Fri Jul 11, 2003 1:59 am

changing the text displayed when a item in a listbox

Post by psychotomus »

is clicked. anyone know how to do this in java?
User avatar
Fredix
Forum Contributor
Posts: 101
Joined: Fri Jul 18, 2003 2:16 pm
Location: Wehr (Eifel) Germany
Contact:

Post by Fredix »

are you sure about Java??? Maybe you mean JavaScript (JS) that IS a BIG diffrence.
psychotomus
Forum Contributor
Posts: 487
Joined: Fri Jul 11, 2003 1:59 am

Post by psychotomus »

yeah javascript
psychotomus
Forum Contributor
Posts: 487
Joined: Fri Jul 11, 2003 1:59 am

Post by psychotomus »

also i allready have a script that changes the image

Code: Select all

<script language="javascript">


function showimage()
&#123;
if (!document.images)
return
document.images.pictures.src=
document.register.char.options&#1111;document.register.char.selectedIndex].value
&#125;
</script>
the value is something .jpg

is there away to have the value be yada then do something like

Code: Select all

<script language="javascript">


function showimage()
&#123;
if (!document.images)
return
document.images.pictures.src=
image = options&#1111;document.register.char.selectedIndex].value + ".jpg"
document.register.char.image
&#125;
</script>
where the value's of the listbox isnt filename.jpg
but instead just filename
then once it activates the script. it add .jpg
cause once i send the form, i really dont want to use string manipulation on the filename.jpg since i allready have it written to be filename
Post Reply