<script type="text/javascript"> function viewImg(e){ var selected = $$('#box_preview_thumb .selected'); for (i=0; i<selected.length;i++) { selected[i].removeClassName('selected') } e.addClassName('selected');
var b = $('box_preview_img').childElements(); for (i=0; i<b.length; i++){ var imgStyle = b[i].getStyle('display'); if (imgStyle!="none"){ var imgSelected = b[i] if (imgSelected.id!=e.id+'_big'){ b[i].fade({ duration:0.2, from:1, to:0, }); } } }; $(''+e.id+'_big').appear({duration:0.2}); }; </script> <div id="contenuti_info"> <div class="box_spec"> <div class="box_preview"> <div class="box_preview_img" id="box_preview_img"> <img id="th_1_big" src="images/ shop_elements/shot_1_big.jpg" style="display:block;"> <img id="th_2_big" src="images/ shop_elements/shot_2_big.jpg" style="display:none;"> <img id="th_3_big" src="images/shop_elements/ shot_3_big.jpg" style="display:none;"> <img id="th_4_big" src="images/shop_elements/ shot_4_big.jpg" style="display:none;"> </div> <div id="box_preview_thumb"> <div class="box1 selected" id="th_1" onclick="alert($('th_1')); viewImg($('th_1'));"><img src="images/ shop_elements/thumb1.gif"/></div> <div class="box2" id="th_2" onclick="viewImg($('th_2'));"><img src="images/shop_elements/ thumb2.gif"/></div> <div class="box3" id="th_3" onclick="viewImg($('th_3'));"><img src="images/shop_elements/ thumb3.gif"/></div> <div class="box4" id="th_4" onclick="viewImg ($('th_4'));"><img src="images/shop_elements/thumb4.gif"/></div> </div> so ... the script works fine in all the browser except ie6 and ie7 .. don't know wath the probem could be.. help me if you can many thanks Aureliano. p.s.:i know the event "onclick" assigned on the html is not a pretty way to write jscript.. but i'm pretty new on jscript. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Prototype & script.aculo.us" group. To post to this group, send email to prototype-scriptaculous@googlegroups.com To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en -~----------~----~----~----~------~----~------~--~---