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 -> PHP

 CCS Are image paths relative in {header} ?

Print topic Send  topic

Author Message
Dave
Posted: 01/19/2004, 5:38 PM

CCS 2.3
PhP
MySQL
This is the header content

<table width="100%" border="0">
<tr>
<td> <img src="images/LogoAnimation.gif"></td>
<td>
<p align="center"> <em><font color="#081010" size="7">Centred
Practices Group</font></em> </p>
</td>
</tr>
</table>

In CCS is the image location relative to the location of the header or
relative to the file in which the header is included ?

It seems that it is the latter case when it would be more logical if it was
the former.
I want to inclucde the header in files at two different levels in the web
site. When the header is included in a file located in the root (index) the
images/ folder is located. But when the header is included in a file at a
level other than the root the images/ folder is not found.

Comments?



peterr


Posts: 5971
Posted: 01/20/2004, 6:22 PM

An image is pretty much a piece of static HTML that points to a physical image file. By default it should be relative to the current page, uless you edit your HTML and point to a different image location. The static HTML is preserved exactly as designed at all times.

If you like to use includable pages with images on two levels then you may need to:
a) Create two separate includable pages
b) Handle your images dynamically - for example by using a Label instead of an image, then programmatically create the appropriate <img src> tags.
c) Use <base> HTML tag in your Header to point to some specific URL as the base, for example:
<base href="http://www.myweb.com">
However this may affect your images on your parent pages, thus you may need to reset the base URL 2nd time, to match your current page level. It may be best to use JavaScript to set the value of the <base> tag automatically, before your header images and after.
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com
View profile  Send private message

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.

PHP Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


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