Hi frds,
I got big trouble in creating svg polygon dynamically.
Here is my javascript code
<script type="text/javascript">
var svgNS = "http://www.w3.org/2000/svg";
function CreateHexagon(xx,yy) {
var x1 = parseInt(xx), y1 = parseInt(yy)
var myHexagon = document.createElementNS(svgNS, "polygon");
myHexagon.setAttributeNS(null, "id", "Hexagon");
myHexagon.setAttributeNS(null, "points", ""((x1 / 4), 0)((3 * x1) / 4, 0)((x1), (y1 / 2))((3 * x1) / 4, y1)((x1 / 4), y)(0, (y1 / 2))); ""
myHexagon.setAttributeNS(null, "fill", "blue");
myHexagon.setAttributeNS(null, "stroke", "none");
document.getElementById('mySVG').appendChild(myHexagon);
}
</script>
and this is my code behind
ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "tn1", "<script>CreateHexagon(978,183)</script>", false);
please please solve my trouble.This is an error
JavaScript runtime error: Function expected