alvinalexander.com | career | drupal | java | mac | mysql | perl | scala | uml | unix  
<td> <script type="text/javascript"> function autoPopulate_myFavouriteFruit(targetElement) { if (targetElement.options[targetElement.selectedIndex].value == '-1') { return; } if (targetElement.options[targetElement.selectedIndex].value == '') { return; } targetElement.form.elements['myFavouriteFruit'].value=targetElement.options[targetElement.selectedIndex].value; } </script> <input type="text" name="myFavouriteFruit" value="banana" id="myFavouriteFruit"/>
<select onChange="autoPopulate_myFavouriteFruit(this);"> <option value="-1">--- Please Select --- <option value=""> <option value="apple">apple <option value="banana" selected="selected">banana <option value="pineaple">pineaple <option value="grapes">grapes </select> </td> </tr>

Other Struts examples (source code examples)

Here is a short list of links related to this Struts ComboBox-2.txt source code file:

Struts example source code file (ComboBox-2.txt)

This example Struts source code file (ComboBox-2.txt) is included in the DevDaily.com "Java Source Code Warehouse" project. The intent of this project is to help you "Learn Java by Example" TM.

Java - Struts tags/keywords

favourite, favourite, fruit:, my, my, please, please, select, select

The Struts ComboBox-2.txt source code

<tr>
    <td class="tdLabel">
... this post is sponsored by my books ...

#1 New Release!

FP Best Seller

 

new blog posts

 

Copyright 1998-2021 Alvin Alexander, alvinalexander.com
All Rights Reserved.

A percentage of advertising revenue from
pages under the /java/jwarehouse URI on this website is
paid back to open source projects.