+ Start a Discussion
SamCousinsSamCousins 

How to change <apex:analyticsChart> attribute via jQuery

I have the following:
<analytics:reportChart reportId="00Oa0000008ksHq" />
I would like to change the reportId attribute value to something else via jQuery.

I have tried putting an id tag as an attribute but it is not supported and won't let me save the page.

I have tried getting the tag like so:
j$("analytics:reportChart").attr("reportId");
but it doesn't find the element on the page.

Does anybody have any ideas how I can change the analytics report chart "reportId" attribute via jQuery?
Best Answer chosen by SamCousins
AshlekhAshlekh
Hi,

Why do you not make this dynamicaly because when you change this by query successfully nothing will happen becuase you need to rerender this area from server side. So it's better to make this dynamic.

<analytics:reportChart reportId="{!VAR}" />

-Thanks
Ashlekh Gera