I am using Image Click Selects Dropdown Item. When using Chosen jQuery, onchange not fire. I am not familiar with js, thus would like to know code exactly on “$(“form_field”).addEvent(‘change’, … );”.
<select id="DropdownListID" name="DropdownListName" onchange="SelectAnItem(this.selectedIndex)">
<option>Select here or click a pattern above.</option>
<option>Fleur</option>
<option>Nine Patch</option>
<option>Pink Gate</option>
<option>Sand Dollar</option>
<option>Sandria</option>
<option>Blue Wheel</option>
</select>
// Place 2 --
// Specify the leading characters of the id values assigned
// to the images. The leading characters would be the id
// value up to the image number.
var LeadingImagesIdValue = "ImageID";
//
// End of customization.
// // // // // // // // // //
function SelectAnItem(ndx) {
var d = document.getElementById(DropdownListIdValue);
for( var i=0; i<d.length; i++ ) {
d[i].selected = false;
var imgi = i + 1;
if( imgi < d.length ) {
document.getElementById(LeadingImagesIdValue+imgi).style.borderColor = "#ffffff"; }
}
d[ndx].selected = true;
if( ndx > 0 ) {
document.getElementById(LeadingImagesIdValue+ndx).style.borderColor = "#999999"; }
}
SelectAnItem( document.getElementById(DropdownListIdValue).selectedIndex );
//--></script>