windows 7 not showing images in html file

Thread Solved

Join Date: Aug 2009
Posts: 17
Reputation: expertotech is an unknown quantity at this point 
Solved Threads: 0
expertotech expertotech is offline Offline
Newbie Poster

windows 7 not showing images in html file

 
0
  #1
Oct 16th, 2009
hello everyone, i have a new pc and it runs on windows 7, and i never had this problem with my other xp pc, everytime i create an html file with images (i have tried jpeg, gif and png so far) only png shows up and not jpg and gif, i need to solve this problem, i have tried to disable my security software and still nothing happned, this happens to both firefox and ie 8. is anyone experiencing the same problem? have you found a solution? what could be causing this? please help, i cant go on webdesigning without it
Last edited by expertotech; Oct 16th, 2009 at 11:14 am.
Reply With Quote Quick reply to this message  
Join Date: May 2007
Posts: 433
Reputation: Atli is on a distinguished road 
Solved Threads: 56
Atli's Avatar
Atli Atli is offline Offline
Posting Pro in Training
 
0
  #2
Oct 17th, 2009
Hey.

How exactly are you adding these images to your HTML?
What are the file paths you are using?

I can't imagine that this has much to do with the OS itself. More likely something like an extremely over-protective AntiVirus, broken browser plugins, or just a typo in the HTML.
Please do not ask for help in a PM. Use the forums.
And use [code] tags!
Reply With Quote Quick reply to this message  
Join Date: Feb 2009
Posts: 4
Reputation: feranm_ie8team is an unknown quantity at this point 
Solved Threads: 1
feranm_ie8team feranm_ie8team is offline Offline
Newbie Poster
 
0
  #3
Oct 17th, 2009
When in IE8, have you tried enabling the Compatibility Mode (broken page icon next to the refresh button)? That may help.

Feran
Internet Explorer Outreach Team
Reply With Quote Quick reply to this message  
Join Date: Oct 2009
Posts: 1
Reputation: userr is an unknown quantity at this point 
Solved Threads: 1
userr userr is offline Offline
Newbie Poster
 
0
  #4
Oct 17th, 2009
how change icon
Reply With Quote Quick reply to this message  
Join Date: May 2007
Posts: 433
Reputation: Atli is on a distinguished road 
Solved Threads: 56
Atli's Avatar
Atli Atli is offline Offline
Posting Pro in Training
 
0
  #5
Oct 17th, 2009
Originally Posted by feranm_ie8team View Post
When in IE8, have you tried enabling the Compatibility Mode (broken page icon next to the refresh button)? That may help.

Feran
Internet Explorer Outreach Team
If that does fix the problem, there is almost definitely something wrong with your HTML.

Try running it through the W3C Markup Validation Service and fix whatever problems it reports.

By the way, are you opening your HTML page via a HTTP server, or are you just opening them of your hard-drive?
If it is the former, this could well be a configuration problem in your HTTP server.
Please do not ask for help in a PM. Use the forums.
And use [code] tags!
Reply With Quote Quick reply to this message  
Join Date: Aug 2009
Posts: 17
Reputation: expertotech is an unknown quantity at this point 
Solved Threads: 0
expertotech expertotech is offline Offline
Newbie Poster
 
0
  #6
Oct 18th, 2009
Originally Posted by feranm_ie8team View Post
When in IE8, have you tried enabling the Compatibility Mode (broken page icon next to the refresh button)? That may help.

Feran
Internet Explorer Outreach Team

yea, it solved the prob in ie8!!! but what about firefox? its still not showing up in firefox, (its being replaced by a broken page too, but i dont think firefox has compatibility feature mode) how do i fix this with firefox? and why is it only not showing jpg and gif with the offline html? it shows all image types on the internet..
Reply With Quote Quick reply to this message  
Join Date: May 2007
Posts: 433
Reputation: Atli is on a distinguished road 
Solved Threads: 56
Atli's Avatar
Atli Atli is offline Offline
Posting Pro in Training
 
0
  #7
Oct 18th, 2009
Originally Posted by expertotech View Post
yea, it solved the prob in ie8!!! but what about firefox? its still not showing up in firefox, (its being replaced by a broken page too, but i dont think firefox has compatibility feature mode) how do i fix this with firefox? and why is it only not showing jpg and gif with the offline html? it shows all image types on the internet..
Hey.

Like I say; it could be a problem with your HTML.
Internet Explorer renders HTML and CSS incorrectly, thus; invalid HTML/CSS will sometimes work in IE whereas it will not work in browsers that render it as it should be rendered. (Firefox, for example.)

IE8 is *more* standards compliant then IE7 was, which would explain why it doesn't show the broken markup like IE7 did.

Show us the HTML, and CSS if you use that. Maybe we can spot the problem.
Even if it is not a problem with the code itself, we might be able to spot the actual problem.
Last edited by Atli; Oct 18th, 2009 at 10:14 pm. Reason: Clarifying.
Please do not ask for help in a PM. Use the forums.
And use [code] tags!
Reply With Quote Quick reply to this message  
Join Date: Aug 2009
Posts: 17
Reputation: expertotech is an unknown quantity at this point 
Solved Threads: 0
expertotech expertotech is offline Offline
Newbie Poster
 
0
  #8
Oct 18th, 2009
ok here's my code, i made it simple but still wont show the jpg

<HTML>
<HEAD>

</HEAD>


<BODY bgcolor="#0080CF" marginwidth="0" marginheight="0" leftmargin="0" rightmargin="0" topmargin="0" bottommargin="0">

<img src="C:\Users\SonnyDajAlexa\Desktop\test\smiley.jpg" alt="test" border="0" >


</BODY>
</HTML>

the path is correct from my local drive...
Reply With Quote Quick reply to this message  
Join Date: May 2007
Posts: 433
Reputation: Atli is on a distinguished road 
Solved Threads: 56
Atli's Avatar
Atli Atli is offline Offline
Posting Pro in Training
 
0
  #9
Oct 19th, 2009
Ahh ok.

In the past, you could have achieved this by doing src="file:///C:/path/to/file.ext" .
By default, browsers use the HTTP protocol to fetch files, and from their point of view, asking for src="C:/Users/..." is the same as asking for src="http://example.com/C:/Users/..." .
So you need to tell the browser you want a local file, and you do that by adding file:/// in front.

However, this is no longer allowed, as it poses a security threat. (See the next post also!)
Trying it in Firefox 3.5 gives you a "broken-image" icon and an error message in the log:
  1. Security Error: Content at http://atli-desktop/test/imgtest.html may not load or link to file:///C:/Users/Atli/Desktop/test/smiley.jpg
And even tho IE doesn't give you any indication of a security issue, I am assuming it blocks the images for the same reason.

What you need to do is use a relative path.
By which I mean; place the images in a folder close to the HTML file and use a source like src="images/myImage.jpg" , where the folder structure looks like:
test/
    htmlfile.html
    images/
        myImage.jpg
Last edited by Atli; Oct 19th, 2009 at 1:40 am. Reason: Clarifying.
Please do not ask for help in a PM. Use the forums.
And use [code] tags!
Reply With Quote Quick reply to this message  
Join Date: May 2007
Posts: 433
Reputation: Atli is on a distinguished road 
Solved Threads: 56
Atli's Avatar
Atli Atli is offline Offline
Posting Pro in Training
 
0
  #10
Oct 19th, 2009
As an afterthought...
The previous post was written assuming you were using a HTTP server, and using a URI like: http://localhost/file.html

The file:/// paths should work fine if you open the HTML file directly from the hard-drive, like: file:///C:/webroot/file.html
The security risk I was talking about doesn't apply to files opened in this manner. (As far I as I know, at least.)
Please do not ask for help in a PM. Use the forums.
And use [code] tags!
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC