Wednesday, March 21, 2012

Need help getting javascript widget to work

I'm trying to get the following to work in my ASP .NET AJAX site:

dhtmlGoodies xpPane

I'd like to use it as a main menu for my site, so this is what my masterpage looks like:

<%@dotnet.itags.org. Master Language="C#" AutoEventWireup="true" CodeFile="Blah.master.cs" Inherits="Blah" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
<link runat="server" type="text/css" rel="stylesheet" id="cssLink" />
</head>
<body>
<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server" >
<Scripts>
<asp:ScriptReference Path="/Blah/scripts/xpPane.js" />
</Scripts>
</asp:ScriptManager>
<div id="dhtmlgoodies_xpPane">
<div class="dhtmlgoodies_panel>">
<div>
<!-- Start content of pane --> Testing...<br />
Test 1<br />
Test 2<br />
Test 3
<!-- End content --> </div>
</div>
</div>
<script type="text/javascript">initDhtmlgoodies_xpPane(Array('Test Title'), Array(true), Array());</script>
<div>
<asp:contentplaceholder id="ContentPlaceHolder1" runat="server">
</asp:contentplaceholder>
</div>
</form>
</body>
</html>

I've seperated the the javascript and css and put them in their own files. I've also put the required images into /Blah/scripts/images/. I added the following to the end of the javascript file:

if (typeof(Sys) !=='undefined'){
Sys.Application.notifyScriptLoaded();
alert("Howdy! I'm an external file.");
}

When I view the page all I see isthis

I do not get any script errors on the page. Also the javascript alert I put in is being shown, so the script is definately being loaded. Any help would be much appreciated! Smile

Hello, i am actually dont know what are you tryting to accomplish from your post. but if you are trying to do the menus. Then just use ASP .NET menu control.

http://quickstarts.asp.net/QuickStartv20/aspnet/doc/navigation/default.aspx

and here is a great video about it:

http://asp.net/learn/videos/view.aspx?tabid=63&id=48


Is there no one here that can get this thing to work? Surely its possible...

Replace " <div class="dhtmlgoodies_panel>">"

with

<div class="dhtmlgoodies_panel">
!

You are so careless!!!!!


I must've read over that line 100 times without noticing the out-of-place angle bracket. Its not so much about carelessness - sometimes it just takes another pair of eyesWink


Thanks for pointing it out, I'll try it later and let you know if it works!!


I've tested it,and found that it worked very well:)

Do you have any question?


Yup it works fine now. Thanks for the help!Big Smile

No comments:

Post a Comment