3 Replies Latest reply: Feb 22, 2013 6:29 AM by VC RSS

    javascript file related

    Vedant
      Hi,
      i have created js file and stored in shared component => files => static files named as Theme.js. code in theme.js file is
      <script language="javascript">
             function changeStyle(name){
                    if(name=='theme_4_0.css')
                           document.getElementById('stylesheet').href='/i/themes/theme_21/css/theme_4_0_ie.css';
                    else if(name=='4_2.css')
                           document.getElementById('stylesheet').href='/i/themes/theme_25/css/4_2.css';
                    else if(name=='responsive_grid.css')
                           document.getElementById('stylesheet').href='/i/themes/theme_25/css/responsive_grid.css';
             }
      </script>
      i have created static select list on page with values as

      STATIC:theme_4_0.css;theme_4_0.css,4_2.css;4_2.css,responsive_grid.css;responsive_grid.css



      how i can call theme.js file on page and want to pass select list as name parameter in js code function.

      and

      Please suggest file i have incorporated in shared components =>static files
      is right or wrong.





      Thanks& Regards
      Vedant