I’m trying to set up the beta version of the classic ASP connector (for use with Grid). Even with the example that has been sent through, every time I try to load the asp page, I get an alert come up with the html code for ‘page cannot be displayed’.
01_grid.asp
<!--#include file="Connector.asp"-->
<%
Dim res
Set res = CreateObject("ADODB.Connection")
res.ConnectionString = "driver={SQL Server};server=localhost;uid=***;pwd=*******;database=********"
res.Open
Dim grid
Set grid = new Connector
grid.init TypeGrid, res, "MSSQL", TypeUnspecified, TypeUnspecified
grid.render_table "tblSupplierContact","ContactID","ContactID, ContactName", "", ""
%>
01_basic.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>For demo purpose only :: &1</title>
<link rel='STYLESHEET' type='text/css' href='dhtmlxGrid/codebase/dhtmlxgrid.css'>
<script src='dhtmlxGrid/codebase/dhtmlxcommon.js'></script>
<script src='dhtmlxGrid/codebase/dhtmlxgrid.js'></script>
<script src='dhtmlxDataProcessor/codebase/dhtmlxdataprocessor.js'></script>
<script src='dhtmlxGrid/codebase/ext/dhtmlxgrid_filter.js'></script>
<script src='dhtmlxGrid/codebase/ext/dhtmlxgrid_srnd.js'></script>
<script src='dhtmlxGrid/codebase/dhtmlxgridcell.js'></script>
<script src='connector.js'></script>
</head>
<body>
<div id="gridbox" width="350px" height="550px" style="background-color:white;overflow:hidden"></div>
<script>
mygrid = new dhtmlXGridObject('gridbox');
mygrid.setImagePath('dhtmlxGrid/codebase/imgs/');
mygrid.setHeader("Column A, Column B");
mygrid.attachHeader("#connector_text_filter,#connector_text_filter")
mygrid.setInitWidths("100,*")
mygrid.setColTypes("edtxt,ed");
mygrid.setColSorting("connector,connector")
mygrid.enableSmartRendering(true)
mygrid.enableMultiselect(true)
mygrid.init();
mygrid.loadXML("01_grid.asp");
var dp = new dataProcessor("01_grid.asp");
dp.init(mygrid);
</script>
<input type="button" name="add" value="add row" onclick="var id=mygrid.uid(); mygrid.addRow(id,'',0); mygrid.showRow(id);">
<input type="button" name="delete" value="delete row" onclick="mygrid.deleteSelectedRows()">
</body>
</html>