views:

13

answers:

1

i am wrking on tag clouds with wp columns ( java script) but it s not wrking .It contains files like tagcloud.swf and swfobject.js . I have added this file in public folder and added html.erb file in the view but its not generating the code and showing any thing on the page the code is

<%= javascript_include_tag 'swfobject.js' %>
<style type="text/css">
  body { background-color: #eee; padding: 20px; }
</style>

<% tags = (current_user.all_tags) %> <% all_tags = tags.flatten.uniq%>

<script type="text/javascript">
    var so = new SWFObject("/tagcloud.swf", "tagcloud", "600", "400", "7", "#ffffff");
    // uncomment next line to enable transparency
    //so.addParam("wmode", "transparent");
    so.addVariable("tcolor", "0x333333");
    so.addVariable("mode", "tags");
    so.addVariable("distr", "true");
    so.addVariable("tspeed", "100");
    so.addVariable("tagcloud", "<tags>

        <% for t in all_tags %>
          <a href='#' style='22' color='0xff0000' hicolor='0x00cc00'><%=t.to_s%></a>
         <%#= link_to t.to_s ,tag_index_path(t) %>
        <% end %></tags>");
    so.write("flashcontent");
</script></body>
A: 

please confirm

swfobject.js must be in public/javascritps folder &

tagcloud.swf in public folder

Salil
yes they are : js in javascript folder and tagcloud in public folder friend
Arpit Vaishnav