Click here to Skip to main content
16,017,986 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi friends,

I have a big pbm to dynamically set and get id in raphael svg element.Pls Pls resolve my pbm.

Here i have post my code,

XML
<pre lang="cs">var paper = Raphael(&quot;div&quot; + i + &quot;&quot;, x, y);
            var rectangle = paper.path("M0,0 L0,100Z")
            rectangle.id = pcName;
            rectangle.attr(&quot;fill&quot;, &quot;#f00&quot;);
            rectangle.attr(&quot;stroke&quot;, &quot;#fff&quot;);</pre>




C#
function createStatus(pcName, status) {
            if (status == 0) {

                var c = document.getElementById(pcName);
                c.attr("fill", "#800000");
            }
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900