Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Arthur on Dec 24, 2008 06:02
open dhtmlx forum
ASP.NET Demo

Hello,

I'm making an application in asp.net using Visual Studio. I've been trying to use the dhtmlxLayout with no success. Could you provide me an aspx examplel?

I read the documentation and samples, but I always get the "dhtmlLaout is undefined" error.

Here's the full code:

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %>

<!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>
</head>


<script src="/dhtmlxLayout/codebase/dhtmlxcommon.js"></script>
<script src="/dhtmlxLayout/codebase/dhtmlxlayout.js"></script>


<link rel="STYLESHEET" type="text/css" href="/dhtmlxLayout/codebase/dhtmlxlayout.css">
<link rel="STYLESHEET" type="text/css" href="/dhtmlxLayout/codebase/skins/dhtmlxlayout_dhx_blue.css">

<script>
function GetLayout()
{
var v_layouy = new dhtmlxLayoutObject(document.getElementById("dlayout"), "3L");
}
</script>

<body onload="GetLayout()">
<form id="form1" runat="server">
<div id="dlayout" style="width:1080px;height:580px">
</div>
</form>
</body>

</html>


What am I doing wrong?


Thanks,
Arthur.
Answer posted by Support on Dec 24, 2008 06:36
Hello,

dhtmlxWindows codebase files should be also included like this:
<script src="/dhtmlxWindows/codebase/dhtmlxwindows.js"></script>

Here is a documentation:
http://dhtmlx.com/docs/products/dhtmlxLayout/doc/guide.html#layout_m9:04
Answer posted on Dec 24, 2008 06:52
Well, thanks for the quick reply, but that didn't work, I still get the "dhtmlxLayout is undefined" error.

I'm trying now to show only a basic dhtmlxWindow following the "Minimal Init" sample, I copied the full source code of the sample page and it still doesn't work ("dhxWins is null or not an object"). Do I have to declare some AJAX assembly or something?

Thanks again,
Arthur.
Answer posted by Support on Dec 24, 2008 07:00
Could you please provide a direct link?
Answer posted on Dec 24, 2008 07:16
Got it working, thanks.

The problem was on

    <link rel="stylesheet" type="text/css" href="/dwin/codebase/dhtmlxwindows.css">
    <link rel="stylesheet" type="text/css" href="/dwin/codebase/skins/dhtmlxwindows_dhx_blue.css">
    <script  src="/dwin/codebase/dhtmlxcommon.js"></script>
    <script  src="/dwin/codebase/dhtmlxwindows.js"></script>

The path was incorrect, I didn't add the Virtual Path, should be:

    <link rel="stylesheet" type="text/css" href="/TestSite/dwin/codebase/dhtmlxwindows.css">
    <link rel="stylesheet" type="text/css" href="/TestSite/dwin/codebase/skins/dhtmlxwindows_dhx_blue.css">
    <script  src="/TestSite/dwin/codebase/dhtmlxcommon.js"></script>
    <script  src="/TestSite/dwin/codebase/dhtmlxwindows.js"></script>


Thanks for all the help,
Arthur.