1 Reply Latest reply on Jan 2, 2013 9:56 AM by JaredLui

    onLoad works on Chrome but not IE or Firefox


      Please refer to a previous issue I had for history: http://forums.adobe.com/message/4767720


      I have a Spry Accordion found here: http://www.onlinetoyshow.com/figure_lines_Detail.php?Line_Id=30


      It works great in all browsers. There is a repeat region within a repeated region in this accordion that pulls up dynamic data. Sometimes the data returns 2 panels, other times it returns 10 panels. In the case of the link above it returns 4 panels.


      Here's where I need help. In the example above using the link the accordion has 4 panels. I need to have the panels count backwards (i.e. 4, 3, 2, 1) so I order it DESC in the SELECT statement and that works fine in all browsers. Now I need the last panel to open as default. In the example above it would be panel 1.


      Spry does not do this. It wants to open the first panel by default. There is defaultPanel setting that allows you to select a default panel however since my panels are dynamic this is not a viable option. I solved this using this onLoad statement:

      <body onLoad="MM_callJS('Accordion1.openLastPanel(); return false;')"> however it only works in Chrome. The desired behavior is that when the example page loads that the accordion has these four panels in theis order 4, 3, 2, 1 and the last one (1) is open.


      This works correctly in Chrome. IE and FireFox show the four panels in the correct order 4, 3, 2, 1 but panel (4) is the one open.


      Any ideas to fix this is greatly appreciated. Thanks in advance!