alvinalexander.com | career | drupal | java | mac | mysql | perl | scala | uml | unix  
<td> <select name="foo.bar" id="foo_bar" onmousedown="window.status='onmousedown';" onmouseup="window.status='onmouseup';" onmouseover="window.status='onmouseover';" onmousemove="window.status='onmousemove';" onmouseout="window.status='onmouseout';" onchange="foo_barRedirect(this.selectedIndex)"> <option value="BE">Belgium <option value="FR">France </select> <br/> <select name="region" id="region"> </select> <script type="text/javascript"> var foo_barGroup = new Array(2 + 0); for (i = 0; i < (2 + 0); i++) foo_barGroup[i] = new Array(); foo_barGroup[0][0] = new Option("Antwerp", "AN"); foo_barGroup[0][1] = new Option("Gent", "GN"); foo_barGroup[0][2] = new Option("Brugge", "BRG"); foo_barGroup[1][0] = new Option("Paris", "PA"); foo_barGroup[1][1] = new Option("Bordeaux", "BOR"); var foo_barTemp = document.inputForm.region; foo_barRedirect(0); function foo_barRedirect(x) { var selected = false; for (m = foo_barTemp.options.length - 1; m >= 0; m--) { foo_barTemp.remove(m); } for (i = 0; i < foo_barGroup[x].length; i++) { foo_barTemp.options[i] = new Option(foo_barGroup[x][i].text, foo_barGroup[x][i].value); } if ((foo_barTemp.options.length > 0) && (! selected)) { foo_barTemp.options[0].selected = true; } } </script> </td> </tr>

Other Struts examples (source code examples)

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

Struts example source code file (DoubleSelect-3.txt)

This example Struts source code file (DoubleSelect-3.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

antwerp, array, array, belgium, bor, brg, fr, france, france, gent, gent, option, option, pa

The Struts DoubleSelect-3.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.