Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Image not showing in IE

Status
Not open for further replies.

rekenaar

Technical User
Feb 16, 2005
38
ZA
Hello. I have a small problem. In the code below the image in the logo frame is showed perfectly in firefox, but the image isn't shown in IE.

Any help would be appreciated.

Code:
<?php
	session_start();
  $_SESSION["bizunit"] = "Main Office"; // Default selected Business Unit
?>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN"
   "[URL unfurl="true"]http://www.w3.org/TR/html4/frameset.dtd">[/URL]
<html>
<head>
<title>EFS Month to Month Update</title>
</head>
<frameset cols="20%, 80%" border=0>
  <frameset rows="50, 150">
	      <frame name=logo src="\img\PROPERTY-FINANCE.gif">
	      <frame name=bizunits src="bizunits.php">
  </frameset>
  <frame name=details src="details.php">
  <noframes>
     Your browser does not support frames.
  </noframes>
</frameset>
</html>
 
This is something that would usually disturb FF more than it would IE, but you never know. In HTML forward slashes (/) rather than backslashes (\) are used to delimit folders. Try changing that first:
Code:
<frame name="logo" src="/img/PROPERTY-FINANCE.gif">
 
Still gets a 404 error. I think you are on to something with the folder delimiters because if I place the image in the root directory of the site the image gets shown.
 
Is it possible that the img folder is not in the root but rather a subfolder of the current folder. And you should use this instead?
Code:
<frame name="logo" src="img/PROPERTY-FINANCE.gif">
 
1: why do you use frames?
2: this is wrong, as they said: <frame name=logo src="\img\PROPERTY-FINANCE.gif">
3: keep names in lowercase, not UPPERCASE
4: Try putting the image inside an .htm(l) file?

Olav Alexander Mjelde
Admin & Webmaster
 
Thank you Vragabond. It is a subfolder of the current folder. It is strange that Firefox automatically resizes the image to fit but IE doesn't.

By the way I use frames because bizunits.php creates a list of radiobuttons dynamically out of a database. If the list gets reloaded every time a page is updated it gives a very irritating little delay. Thus I use a frame so that it gets created only once.
 
I would step away from frames and do the design in CSS (div).

as for lowercase, I think it's good naming-convention to keep filenames also in lowercase.
I've had ussies before, when files where called foo.jpg or foo.JPG, they would sometimes be case-sensitive.

I also know php on windows, is case-sensitive on require_once().

This is not the issue now, however, as you said they work, when they are in doc-root.

Olav Alexander Mjelde
Admin & Webmaster
 
I've had ussies before, when files where called foo.jpg or foo.JPG, they would sometimes be case-sensitive.

That'll be your code being bad, then. If you use a different case for file or folder names in your code than the actual files or folders have, it's asking for trouble.

If the cases match, you can use upper, lower, or a mixture - it matters not.

Dan


[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
There is no reason at all to keep names in lowercase
No technical reason, maybe, but can be a real sanity saver. Even if you are not hosted on unix, there are areas like Javascript that are case-sensitive. When I think of the hours I've spent debugging, only to come up with a "Foo" being used somewhere instead of "foo", the more sure I am that always-use-lower (or ALWAYS-USE-UPPER, or Always-Use-Camel if you prefer) is good advice. If everything's always lower (or whatever) it's one less thing to remember.

It is strange that Firefox automatically resizes the image to fit but IE doesn't
Not necessarily, it depends on the set-up of the individual browser - I think IE can be set up to resize-to-fit, I'm sure FF can be set up not to. One answer, as Olav says, is to make a little html page so you can control how the image is shown more precisely.

However, it does raise a question - why does the image need to be resized by the browser? How big is it, and how big does it need to be on the page? Could this be the real reason for your "very irritating little delay" when using the non-frame method - the browser pausing to download an unnecessarily large image and shrink it down to fit. Never use the browser to shrink images - if you want them at a particular size, make them that size to start with.

The pros and cons of frames have been argued over plenty of times on this forum. You need to balance the irritation of reloading parts of your page each time, with the irritation of not being able te easily bookmark or link to particular pages within your site. You may be the only person to really notice the former, many may get hung up on the latter.

That's not to say that, with skill and care, you can't make an accessible, search- and user-friendly framed site, but it will take more work to get it right. I'd rather spend that time on content (or maybe beer).

-- Chris Hunt
Webmaster & Tragedian
Extra Connections Ltd
 
That'll be your code being bad, then. If you use a different case for file or folder names in your code than the actual files or folders have, it's asking for trouble.

If the cases match, you can use upper, lower, or a mixture - it matters not.

Dan
I've actually had experiences, where different applications seem to want to put the extension in UPPERCASE, like:
foo.JPG, even though I named them foo.jpg

Suddenly, they wont work!

Even so, I think names/coding, etc. looks "ugly" in uppercase, as most of us are used to read in lowercase.

If one has a normalized way of writing in UPPERCASE, it will work in HTML, this is true, but even so, it looks "not good".

I think this discussion however, is starting to be a bit off-topic, as it does not solve his issue, it was meerly a normalization tip I thought I'd mention in the passing.

I think his problem is with "relative paths" and they not beeing aligned with his index, or something in that matter.

Why FF displays it, *scratch head*.

I think we need more info about paths/directory structure.

eg:
where is the index file?
where is the /img/ dir?

Olav Alexander Mjelde
Admin & Webmaster
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top