Click here to Skip to main content
15,896,912 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi guys,
I am using a javascript called jsPlumb to draw some diagram in my webpage. I already downloaded the latest version of the script and include it in my page. But when I compiled it, it keeps on saying jsPlumb is not defined although I already include it in my project.

Below is my HTML code:
ASP.NET
<%@ Page Title="Home Page" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true"
    CodeBehind="Default.aspx.cs" Inherits="SegmentManager._Default" %>

<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
    </asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
    <h2>
        Welcome to Segment scaling management system!</h2>
    <h3>  
        
        <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script>

        <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.9.2/jquery-ui.min.js"></script>

        <script type="text/javascript" src="Scripts/jquery.jsPlumb-1.5.4.js"></script>
        <script type="text/javascript">

            jsPlumb.ready(function () {
            //perform operation only after DOM is loaded  

            var e0 = jsPlumb.addEndpoint("container0"),

                e1 = jsPlumb.addEndpoint("container1");
                jsPlumb.connect({ source: e0, target: e1 });

            });
        </script>
    
    </h3>
</asp:Content>
Posted
Comments
Sergey Alexandrovich Kryukov 29-Nov-13 22:47pm    
Not clear. This is not yet HTML code. You can get HTML code is you look at it from the browser, using "View page source".
What do you mean by "compile". A script?.. :-)
—SA
nizam15 29-Nov-13 22:54pm    
yeah sorry i just realize what i post is my asp.net code.
Ok I want to make a page with a diagram(if you remember I did post a question regarding this yesterday...hehe), so I decided to use jsPlumb. So I downloaded the javascript and include it in my ASP page as you can see in the code above. I also already include the javascript into my project. But every time I want run to preview the page, it keeps on saying jsPlumb is not defined.
Richard MacCutchan 30-Nov-13 5:21am    
Check the source path in your script tag; you probably need the full URI.
nizam15 30-Nov-13 8:09am    
I already double check the path. I'm pretty sure the path is correct.
Richard MacCutchan 30-Nov-13 11:41am    
That is a relative path so it may nor be valid when the browser is looking for it.

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