Hi there,
I am fighting with a small, probably dumb, issue.
I want to call the properties of an SVG element. The element is composed of several elements:
Now, it seems I can't call it this way:
I guess that, as the ID is textual and not numerical, it should somehow be within apostrophes, as it works this way:
But how would the Javascript need to look like in order to be accepted? I tried it with multiple apostrophes, and with backslash-apostrophe, but in vain.
Thanks for any hints!
I am fighting with a small, probably dumb, issue.
I want to call the properties of an SVG element. The element is composed of several elements:
Code:
t = 'id_' + selectedIndex + '_' + clicked_element_year;
Now, it seems I can't call it this way:
Code:
clicked_element_text = svgDocument.getElementById(t).getAttributeNS(null,'mouseovertext');
I guess that, as the ID is textual and not numerical, it should somehow be within apostrophes, as it works this way:
Code:
clicked_element_text = svgDocument.getElementById('id_784_2008').getAttributeNS(null,'mouseovertext');
But how would the Javascript need to look like in order to be accepted? I tried it with multiple apostrophes, and with backslash-apostrophe, but in vain.
Thanks for any hints!
Comment