why won't my image appear?

J

John Salerno

Here's the link, if it helps: http://python.johnjsalerno.com/

I have the Python logo set at the top of the page, but the alternate
text gets displayed instead. I have the image in the right place, as far
as I can tell. It's in the icons directory, which is one level above the
directory where this index file is. Does it matter that it's a
subdomain? It's pointed to a 'python' directory, which is in my main
server space, along with the 'icons' directory also.
 
B

Beauregard T. Shagnasty

John said:
Here's the link, if it helps: http://python.johnjsalerno.com/

I have the Python logo set at the top of the page, but the alternate
text gets displayed instead. I have the image in the right place, as far
as I can tell. It's in the icons directory, which is one level above the
directory where this index file is. Does it matter that it's a
subdomain? It's pointed to a 'python' directory, which is in my main
server space, along with the 'icons' directory also.

Try this for the
<img src="http://johnjsalerno.com/icons/python-logo.gif"
 
B

Blinky the Shark

John said:
Here's the link, if it helps: http://python.johnjsalerno.com/

I have the Python logo set at the top of the page, but the alternate text
gets displayed instead. I have the image in the right place, as far as I
can tell. It's in the icons directory, which is one level above the
directory where this index file is. Does it matter that it's a subdomain?
It's pointed to a 'python' directory, which is in my main server space,
along with the 'icons' directory also.

I dunno, but http://python.johnjsalerno.com/icons/python-logo.gif sure
throws a 404. Is it kosher to have nothing but an image in a header?
 
J

John Salerno

Blinky said:
I dunno, but http://python.johnjsalerno.com/icons/python-logo.gif sure
throws a 404. Is it kosher to have nothing but an image in a header?

Yeah, that could be part of the problem. python.johnjsalerno.com points
to the 'python' folder on my server, but the 'icons' folder is not a
part of that folder, it is also in the main area with the python folder.
But the img src attribute goes up one level in the hierarchy, so I don't
see why that would be a problem, if it is.
 
L

Leonard Blaisdell

John Salerno said:
Here's the link, if it helps: http://python.johnjsalerno.com/

I have the Python logo set at the top of the page, but the alternate
text gets displayed instead.

Not in my browser. I get a 'question mark image' instead. Nothing
alternate at all. If alternate pops up for you, it's because the alt
attribute is set and Explorer thinks it's the title attribute. Try
another browser to see that the alternate text does not get displayed,
unless you're using Lynx.
I have the image in the right place, as far
as I can tell.

I don't think you do. Or the permissions may be set incorrectly.
It's in the icons directory, which is one level above the
directory where this index file is.

Normally, that would be one level *below* where the index file is. You
probably have a permissions problem.
Does it matter that it's a
subdomain?

I don't know.

It's pointed to a 'python' directory, which is in my main
server space, along with the 'icons' directory also.

You are not serving from the normal hierarchy. I suggest you do. This is
a solvable problem. You are not serving from the right directory or your
permissions are wrong. Pointed to correctly, and image will be
displayed.

leo
 
J

Jim Moe

John said:
Here's the link, if it helps: http://python.johnjsalerno.com/

I have the Python logo set at the top of the page, but the alternate
text gets displayed instead.
src="../icons/python-logo.gif"
Yes, it is because you are in a subdomain. Its DocumentRoot (using
apache terminology) does not share the same space as the main domain. You
are asking to go to a directory that is higher (more "rooty", a
super-root?) than the root directory of the subdomain.

1. Create an icons directory from the subdomain's DocumentRoot, place the
image there
2. Place the image in the subdomain's DocumentRoot
3. Use a fully qualified URL as noted by others
4. Check your server's docs; there may be a way to allow the access anyway
 
J

John Salerno

John said:
Here's the link, if it helps: http://python.johnjsalerno.com/

I have the Python logo set at the top of the page, but the alternate
text gets displayed instead. I have the image in the right place, as far
as I can tell. It's in the icons directory, which is one level above the
directory where this index file is. Does it matter that it's a
subdomain? It's pointed to a 'python' directory, which is in my main
server space, along with the 'icons' directory also.

Thanks guys! I guess I was ignorant of how subdomains worked! :)
 
S

Steven Saunderson

src="../icons/python-logo.gif"
Yes, it is because you are in a subdomain. Its DocumentRoot (using
apache terminology) does not share the same space as the main domain. You
are asking to go to a directory that is higher (more "rooty", a
super-root?) than the root directory of the subdomain.

I thought that it might be a security issue (accessing beneath the root
for the subdomain) but I have seen pages that request files (e.g. CSS)
that are lower (more "rooty"). I checked with Opera and it drops the
leading '..' when building the URL for the image. This doesn't happen
in the other cases I have seen as they have a path after the domain
name. So the '..' must be processed by the browser rather than being
passed back to the server. If the browser can't drop the last level in
the path it just ignores the '..'.
 
B

Blinky the Shark

Leonard said:
Not in my browser. I get a 'question mark image' instead. Nothing
alternate at all. If alternate pops up for you, it's because the alt
attribute is set and Explorer thinks it's the title attribute. Try another
browser to see that the alternate text does not get displayed, unless
you're using Lynx.

I got the alt text with Firefox.
 
B

Blinky the Shark

Jim said:
are asking to go to a directory that is higher (more "rooty", a
super-root?) than the root directory of the subdomain.

Rooty-toot-toot!

Sorry. Lost my head, there, for a moment. :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,535
Members
45,008
Latest member
obedient dusk

Latest Threads

Top