3 Replies Latest reply on Jun 11, 2010 5:55 PM by Luis Tama

    rich:effect and compatibility with browsers

    Dmitry Trunikov Newbie

      Hi ALL!


      I've a page where use tags rich:effect to show/hide some part of the page. Below is a code snippet:


                           <rich:effect name="show_audience_grp" for="#{rich:clientId('audience_grp')}" type="BlindDown"/>
                              <rich:effect name="hide_audience_grp" for="#{rich:clientId('audience_grp')}" type="BlindUp" />
                              <rich:effect name="show_audience_cli" for="#{rich:clientId('audience_cli')}" type="BlindDown" />
                              <rich:effect name="hide_audience_cli" for="#{rich:clientId('audience_cli')}" type="BlindUp" />
                              <script type="text/javascript">//<![CDATA[
                                  function displayAudiencePanel() {
                                      var audience_type = #{rich:element('audience_type')}.value;
                                      if (audience_type == 'CLIENT_GROUPS') {
                                      } else {
                              <h:selectOneMenu id="audience_type" value="#{msgHome.instance.audienceType}" onchange="javascript:displayAudiencePanel()" style="margin-bottom: 5px">
                                  <s:convertEnum />
                                  <s:enumItem enumValue="CLIENT_GROUPS" label="Client groups" />
                                  <s:enumItem enumValue="CLIENTS" label="Clients" />


      The code works fine in FireFox3 but not in Google Chrome or Opera.


      When the page is loading I can see following error in error console of Google Chrome:


      Uncaught ReferenceError: params is not defined


      the error in Opera is:


      JavaScript -
      Inline script thread
      name: ReferenceError
      message: Statement on line 1: Undefined variable: params
      stacktrace: n/a; see  opera:config#UserPrefs|Exceptions Have Stacktrace


      Can anybody give me advice how can I fix the issue?
      I use RF 3.3.3.Final.


      Thanks in advice.