I am new to Raphael, as well as asp.net. I am trying to test a simple raphael example with asp.net, but I keep geting the following error: Microsoft JScript runtime error: Object expected
this error occurs in this line:
var paper = Raphael("diii", 320, 200);
this is the page full code:
<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master"AutoEventWireup="true" CodeFile="Lingua.aspx.cs" Inherits="Lingua" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" Runat="Server">
<script type="text/javascript" src="Scripts/raphael.js"></script>
<script type="text/javascript" src="Scripts/jquery-1.4.1.js"></script>
<script type="text/javascript">
function createCircle() {
var paper = Raphael("diii", 320, 200);
var circle = paper.circle(50, 40, 10);
cicle.attr("fill", "#f00");
circle.attr("stroke", "#fff");
}
</script>
<asp:GridView ID="GridView1" runat="server">
</asp:GridView>
<asp:DropDownList ID="DropDownList1" runat="server">
<asp:ListItem Value="ger">one</asp:ListItem>
<asp:ListItem Value="ara">two</asp:ListItem>
</asp:DropDownList>
<asp:Button ID="Button1" runat="server" onClientClick="return createCircle();"
Text="Add" />
<div id="diii"></div>
</asp:Content>
The same error occurs if insted of the mentioned line above I use:
var paper = Raphael(10,50,320,200);
Does anyone know what is the problem?