View Complete Thread | FoxWeb Forum Home
Date:    Msg ID:   
From:    Thread:   
 I got the image to display but I am not sure why. I changed the image reference to read as follows:

<img src="marketing4insurance/picts/mbm_zipcodes.jpg" width="100%" Height="150">

I have C:\Inetpub\wwwroot\MARKETING4INSURANCE set up as a virtual directory with an alias of marketing4insurance. Is this correct and ok? Why do I need to put marketing4insurance as part of the path to the image? Since the path is: C:\Inetpub\wwwroot\MARKETING4INSURANCE I thought any relative image reference would relatve to that path.

Does this mean references to javascipt and other images need to have marketing4insurance in front of them?

Please see my path / program setup below.

John Sullivan

Sent by John Sullivan on 08/20/2006 09:56:33 PM:
All images are located in my web root which is:


This directory is set up as a virtual IIS directory

The scripts are located in a directory outside the web root. This directory is:


This directory is specified as my default program root in the Virtual Servers tab in the FoxWeb Control Center.

I have tried every configuration of the script possible and still cannot get the image to view with the script located outside the web root.

Note: If I place the script in the web root and then change the Virtual Server tad check box to "Use Web Server's Direct" the image displays as expected.

The Foxweb DLL is located in the C:\Inetpub\Scripts directory. The FWX extention is correctly mapped to that DLL. The FoxWeb program is installed in its default directory.

What am I doing wrong? The script is as simple as I can make it. I have tested every scenario possible.

I will try any ideas you have. Thanks for your help.

John Sullivan

Sent by FoxWeb Support on 08/20/2006 07:11:46 PM:
You did not provide us with the location of your Web root, FoxWeb Program Root, directory where the images are located and directory where your scripts are located in each example.  This makes it harder to be certain of the problem, but I will try.
I assume that your script code remains the same in both examples.  The code uses "/picts/mbm_zipcodes.jpg" for the image source, which means that your images must reside in the picts sub-folder of your web root.  In order for both scenarios to work, the scripts must remain in that location.  Even if you move your script ourside the web tree, the images must remain there.

FoxWeb Support Team email

Sent by John Sullivan on 08/20/2006 05:45:06 PM:
I am trying to get scripts located outside the web tree to work properly. The scripts run  but do not produce the expected browser output unless I place them in the web tree and then change the Foxweb  Control Center to reflect Use Web Server's Directory Mappings. Specifically, the image is outputted correctly when using script located in the web tree but not outputted when located outside the web tree.

I have read the Locating and Addressing Scripts many times but obviously I am missing something. Perhaps the following information will enable you to point me in the right direction.

Here is the setup. I used a simple Foxweb script and called it Zip_Test.Fwx. The script looks like this:

*** Foxweb Zip_Test.FWX TEST script*********************

** The testinfo is outputted so I know I am in the correct script
TestInfo = "this is test #5"
<title>Zipcode Search Page</title>
<img src="/picts/mbm_zipcodes.jpg" width="100%" Height="150">


Using the “Use Web Server's Directory Mappings” in the Foxweb Control Center and with the script located in the web tree, the following URL works.

http://localhost/Marketing4insurance/ZIP_test.FWX    (this works)

Storing the Foxweb script in the web tree allows the graphic to display as expected.


With  the “Use Web Server's Directory Mappings” UNCHECKED in the Foxweb Control Center, and placing the script in the directory specified in the Foxweb Control Center, the following URL DOES NOT WORK.

http://localhost/ZIP_test.FWX (This does not work – I reload the browser each time with a different test number to ensure the script recompiled and ran.)

I tried a variety of options for relative addressing and none works. These are:
<img src="\picts\mbm_zipcodes.jpg" width="100%" Height="150">
<img src="picts\mbm_zipcodes.jpg" width="100%" Height="150">
<img src=".\picts\mbm_zipcodes.jpg" width="100%" Height="150">
<img src="..\picts\mbm_zipcodes.jpg" width="100%" Height="150">
<img src="/picts/mbm_zipcodes.jpg" width="100%" Height="150">
<img src="picts/mbm_zipcodes.jpg" width="100%" Height="150">
<iimg src="../picts/mbm_zipcodes.jpg" width="100%" Height="150">
Do you have any suggestions on what to try next?

John Sullivan