CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> ASP

 Header, subfolders and images

Print topic Send  topic

Author Message
Lucca
Posted: 05/28/2004, 9:09 AM

Hello everyone,

Using CCS latest and access asp.

I have a web site with a "header" consisiting of some images and when I call
it from a page under the site´s root everything works ok. (images/01.jpg)
imagine.... www.xxx.com/principal.asp (example not real) The header here
displays the html and the images correctly

But If I create a subfolder (under the root) when I insert the "header" in a
page, I redirect it to ../header.asp (one slash above). When opening the
*.asp page from the subfolder, calls ok the "header" html, but not the
images. If I want it to run properly, I have to copy the folder images under
the new subfolder.

so... www.xxx.com/subfolder/hello.asp the header from this page is loaded,
html ok, images not.

The drawback is that everytime I click on a "subfolder" page the image has
to load from the server again...

Why the html is ok but the images don´t work?

Any hint will be greatly appreciated.

Regards

Lucca
Posted: 05/29/2004, 12:51 AM

Well, let me explain it in another way...why {Header] does not work when
used in a main root´s subfolder web?
Looks like it only loads the hmtl but not the images tied to the {Header]

So:
Here works ok
www.xxx.com/
Header.asp
Header.html
Header.ccp
Images(folder)
index.asp (this page works here)

index.html
index.ccp

Here does not:
www.xxx.com/
Header.asp
Header.html
Header.ccp
Images(folder)
index.asp
index.html
index.ccp
www.xxx.com/folder1/
hello.asp
hello.html
hello.asp (this page has the {Header] included and pointed to
www.xxx.com/Header.ccp . It does not work if I don´t copy the Images
(folder) to www.xxx.com/folder1/images(folder)

+Looks like I am messing some path or something to the pctures, or is it
that the include page {header} onñy works if all the files are under the
same directory and if I redirect it to another "place" it does not work??

Regards
DonB
Posted: 05/29/2004, 7:05 AM

The behavior is due to the way includes are processed. They get built with
the appropriate relative reference to the image file, but once included the
"point of reference" changes. It is then relative to the page that contains
the included page so the images are no longer where it thinks they are.
It's a pain in the butt, to be sure.

It would be nice if there were "parent" and "child" object references
(properties) so that references like this could be resolved by examining
those properties to find out where in the inclusion-hierarchy an object
resides. This might provide a way to handle the issues with nested
includes, too.

You can set the image references at runtime with a Before Show event that
does this sort of thing:

EventCaller.Value = PathToRoot & "images/picture.gif"

where "PathToRoot" is defined by CCS and points you to the top level folder
of the site.

--
DonB

http://www.gotodon.com/ccbth

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.