Ajax DataGrid Support Product Page

Data not showing - problem with paths in wizard

Reported 23 Sep 2010 13:44:02
1
has this problem
23 Sep 2010 13:44:02 Sally Carr posted:
I just downloaded the Ajax/MP3 combo yesterday and cannot get the grid to show my data. I viewed the tutorial and read the manual, but still no success. If you look at www.riverofgodchurch.com/SermonMessagesTEST2.asp you will see my Ajax page. I tested the data connection in the wizard and it worked fine and the database connection works fine in another page I made using DW’s Data Objects. I checked and all my files and folders are on the server.

In my page in DW, it shows the grid with the table headings, but if I preview it nothing (including table headings) is there, the same as in the server link above. The other strange thing is if I try to edit the grid by selecting it, and clicking on Advanced, there is nothing in the Content section.

If I look at the code, I see :

<link rel="stylesheet" type="text/css" href="../../../inetpub/wwwroot/RiverOfGod/Styles/dmxGrid/dmxgrid/dmxgrid.css" />
<script language="javascript" type="text/javascript" src="../../../inetpub/wwwroot/RiverOfGod/ScriptLibrary/jquery-latest.pack.js"></script>
<script language="javascript" type="text/javascript" src="../../../inetpub/wwwroot/RiverOfGod/ScriptLibrary/flexigrid.pack.js"></script>

And down further:

$(function(){$('#dmx_grid5').flexigrid({
url: "../../../inetpub/wwwroot/RiverOfGod/ajax_servers/dmx_grid5.asp",

Which obviously are incorrect paths. If I remove the ../ parts the page starts to display but then I get the error

Active Server Pages error 'ASP 0131'
Disallowed Parent Path
/RiverOfGod/ajax_servers/dmx_grid5.asp, line 6
The Include file '../Connections/messages.asp' cannot contain '..' to indicate the parent directory.

Going to the dmx_grid5.asp page and trying to remove the “../ “ from the path results in an error that the file isn’t found.


So I’m totally stumped. Why is the wizard not getting the path correctly and how can I fix this?

Thank you.
Sally

Replies

Replied 23 Sep 2010 15:56:04
23 Sep 2010 15:56:04 Miroslav Zografski replied:
Hello Sally.

First of all In your DW site definition which is the root folder and are the Styles, ScriptLibrary and ajax_servers folders resided there?
Second. to allow usage of ../ you must set that in your IIS Server. to resolve this on IIS 6 without changing the application:
  1. Click Start, click Administrative Tools, and then click Internet Information Services (IIS) Manager.
  2. Double-click your computer name in the left pane, and then double-click Web Sites.
  3. Locate the Web site and directory that houses the ASP application.
  4. Right-click the application site or directory, and then click Properties.
  5. Select Home Directory, and then click Configuration.
  6. Click Options, and then click to select the Enable Parent Paths check box.
  7. Click OK two times.

  8. If you are using IIS7 check following link:
    help.webcontrolcenter.com/KB/a1115/how-to-enable-parent-paths-in-iis7-dedicatedvps.aspx

    Regards,
Replied 23 Sep 2010 18:42:43
23 Sep 2010 18:42:43 Sally Carr replied:
QuoteFirst of all In your DW site definition which is the root folder and are the Styles, ScriptLibrary and ajax_servers folders resided there?


Yes, they are in my root directory, as the installation wizard installed them. So I'm still don't know why I'm getting the crazy paths in my page.

QuoteSecond. to allow usage of ../ you must set that in your IIS Server. to resolve this on IIS 6 without changing the application:


My hosting provider is Network Solutions and I do not have this kind of control over the server. However I have many files that use ../ such as when inserting images, and have no problem with that. I'm not sure if there is something special about the Connections folder, but I use relative paths for other folders all the time.

I have other dynamic pages using <!--#include file="Connections/messages.asp" --> without problems, but they have it inserted in line 2 of the code, right after <%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>.

For example, if you look at this dynamic test page made with DW's Insert>Data Objects the first two lines of code are

<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<!--#include file="Connections/messages.asp" -->

But if I try modifying the dm_grixx.aps file, so it changes from

<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<% Response.Charset = "utf-8" %>
<%
' Starts DMXzone Configuration (DO NOT REMOVE THIS)
%>
<!--#include file="../Connections/messages.asp" -->

to

<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<!--#include file="Connections/messages.asp" -->
<% Response.Charset = "utf-8" %>
<%
' Starts DMXzone Configuration (DO NOT REMOVE THIS)
%>

I get an error that "The include file 'Connections/messages.asp' was not found."

But - good news - I found as I worked on this that I can get to the Ajax grid working is if I manually change the Styles & Script Library path codes in my page and leave the dm_gridx.asp page as it is. Then I get this!

I'd still be interested if you have any ideas on why the paths are not correct, but at least I can get it working!

Now I can move on to cleaning up the look and trying to attach the mp3 behavior to the audio file.

Thank you for your help. I really searched hard for a mp3 player that could utilize dynamic data. I think the combo of the Ajax grid with the mp3 player will give me an elegant solution to my problem.

Sally

Replied 23 Sep 2010 19:20:51
23 Sep 2010 19:20:51 Sally Carr replied:
Quote
Second. to allow usage of ../ you must set that in your IIS Server. to resolve this on IIS 6 without changing the application:


I forgot to mention - I did do this on my local PC. That was very helpful for previewing. Thank you.
Replied 27 Sep 2010 10:38:58
27 Sep 2010 10:38:58 Miroslav Zografski replied:
Hello Sally,

I was referring the paths on your page and not those in the Data Grid server page.

Regards,
Replied 27 Sep 2010 21:56:16
27 Sep 2010 21:56:16 Sally Carr replied:
QuoteHello Sally,

I was referring the paths on your page and not those in the Data Grid server page.

Regards,


Hello Miroslav,

Thank you for your reply.

It is the paths on my page, not the Data Grid server page, that are the problem.

I have followed your instructions on allowing the usage of ../ on my local server, but still have incorrect path information in my page when using either the Ajax Data Grid or the Flash Mp3 player.

My page is in my root directory and the Styles, ScriptLibrary and ajax_servers folders are installed off the root where the installation program put them.

I believe my site definition path for my local server is set up correctly in Dreamweaver - I've not had any problem browsing the site locally including previewing dynamic data. Here is a image of it:




But every time I edit the grid, it will save the path so it reads:

<script language="javascript" type="text/javascript" src="../../../inetpub/wwwroot/RiverOfGod/ScriptLibrary/flexigrid.pack.js"></script>

instead of:

<script language="javascript" type="text/javascript" src="ScriptLibrary/flexigrid.pack.js"></script>

I can manually change the paths each time I edit the grid. But it would be nice if I knew why it's doing this.

Thank you,
Sally

Reply to this topic