Hi wondered if someone could help me i am having the same kind of issue: if you go here:
http://bluegeeks-testserver.co.cc/jaclyn-beta/index.php?route=product/product&path=1&product_id=1
and your see the Select Drop Down called: Fonts, well if you choose say Airstrip or Arial the image should change but the problem i am having is. It works in IE9 and FF but doesn't seem to work in IE7, IE8 or Google Chrome i hope someone can help here is the code:
<?php if($option['mode'] == "select"){ ?>
<select name="option[<?php echo $option['option_id']; ?>][]"id="option[<?php echo $option['option_id']; ?>]"<?php echo $option['option_value'][0]['extra']['reqd'] == '1' ? ' validate="required:true"' : ''; ?><?php echo isset($option['option_value'][0]['extra']['allowmultiple']) && $option['option_value'][0]['extra']['allowmultiple'] == '1' ? ' multiple="multiple"' : ''; ?><?php echo isset($option['option_value'][0]['extra']['list_height']) ? ' size="'.$option['option_value'][0]['extra']['list_height'].'"' : ''; ?>>
<?php foreach ($option['option_value'] as $option_value) { ?>
<option value="<?php echo $option_value['option_value_id']; ?>" <?php echo (isset($option_value['option_image']) && !empty($option_value['option_image']) ? 'onClick="getPreview(\''.$option_value['option_image_thumb'] .'\', \''.$option_value['option_image_popup'] .'\');"' : ''); ?>><?php echo $option_value['name']; ?>
<?php if ($option_value['price']) { ?>
<?php echo $option_value['prefix']; ?><?php echo $option_value['price']; ?>
<?php } ?>
</option>
<?php } ?>
</select></td>
<?php } //end if select ?>
I know people looking at this will think "Oh My God" alot of php code :) but the only part you need to concentrate on is the part ahve put in RED here: onClick="getPreview:
Jquery Code:
<script language="javascript" type="text/javascript"><!--
function getPreview(image,popup){
$('#image').attr('src', image); //return a preview file
$('a.thickbox').attr('href', popup); //return a preview file
}
//--></script>
Hope someone can help me with this as its really bugging me
Thanks
Aaron