loading image from computer to browser

  • (2 Pages)
  • +
  • 1
  • 2

26 Replies - 804 Views - Last Post: 08 February 2012 - 07:31 AM

Topic Sponsor:

#16 bita  Icon User is offline

  • D.I.C Head

Reputation: 2
  • View blog
  • Posts: 142
  • Joined: 21-April 09

Re: loading image from computer to browser

Posted 08 February 2012 - 06:31 AM

View PostSho Ke, on 08 February 2012 - 04:49 PM, said:

Could it be that you don't have a <head> tag? All HTML documents are required to have a beginning and ending <head> tag before the body starts, but still within the <html> tag.
It should look something like this:
<html>
<head>
	<title> </title>
</head>
<body>

</body>
</html>


No, I don't have head tag, but I don't think that it makes any differences, because it just ad a title to the browser, and has nothing to do with the image.
Was This Post Helpful? 0
  • +
  • -

#17 Dormilich  Icon User is online

  • 痛覚残留
  • member icon

Reputation: 2147
  • View blog
  • Posts: 5,430
  • Joined: 08-June 10

Re: loading image from computer to browser

Posted 08 February 2012 - 06:34 AM

invalid markup can indeed influence the behaviour of elements elsewhere in the page. though I doubt it is an issue here you should definitely validate every HTML you write to exclude that kind of errors.

what does your latest (complete) HTML code look like?
Was This Post Helpful? 0
  • +
  • -

#18 bita  Icon User is offline

  • D.I.C Head

Reputation: 2
  • View blog
  • Posts: 142
  • Joined: 21-April 09

Re: loading image from computer to browser

Posted 08 February 2012 - 06:41 AM

View Postrevolutionx, on 08 February 2012 - 05:00 PM, said:

Ok, so you have the image (jpg) and htm file inside the html folder on your desktop, correct?

So the image code in the html page should look like this:

<img src="sophia.JPEG" alt="sth" width="600" height="700" />



As we want to use a relative path, and not an absolute one. If you update your htm file and run it again with that img code does it work?


Yes, that's exactly what I wrote, and what we discussed about but still there is no result!
Was This Post Helpful? 0
  • +
  • -

#19 Dormilich  Icon User is online

  • 痛覚残留
  • member icon

Reputation: 2147
  • View blog
  • Posts: 5,430
  • Joined: 08-June 10

Re: loading image from computer to browser

Posted 08 February 2012 - 06:41 AM

what does your latest (complete) HTML code look like?
Was This Post Helpful? 0
  • +
  • -

#20 bita  Icon User is offline

  • D.I.C Head

Reputation: 2
  • View blog
  • Posts: 142
  • Joined: 21-April 09

Re: loading image from computer to browser

Posted 08 February 2012 - 06:45 AM

View PostDormilich, on 08 February 2012 - 05:11 PM, said:

what does your latest (complete) HTML code look like?


<html>

<head>
<title>This is my page </title>
</head>
<body>

<h2>This is my rabbit</h2>
<img src="sophia.JPEG" alt="sth" width="600" height="700" />

</body>
</html>

Was This Post Helpful? 0
  • +
  • -

#21 Dormilich  Icon User is online

  • 痛覚残留
  • member icon

Reputation: 2147
  • View blog
  • Posts: 5,430
  • Joined: 08-June 10

Re: loading image from computer to browser

Posted 08 February 2012 - 06:48 AM

that code works for me (if I use an image I have).
Was This Post Helpful? 0
  • +
  • -

#22 revolutionx  Icon User is offline

  • D.I.C Head

Reputation: 57
  • View blog
  • Posts: 222
  • Joined: 23-July 09

Re: loading image from computer to browser

Posted 08 February 2012 - 06:48 AM

If you get a few test images, like a .gif and .png image. And test those ones to see if any of them display when you run the page in the browser.
Was This Post Helpful? 0
  • +
  • -

#23 Shane Hudson  Icon User is offline

  • D.I.C Technophile
  • member icon

Reputation: 326
  • View blog
  • Posts: 1,266
  • Joined: 06-December 09

Re: loading image from computer to browser

Posted 08 February 2012 - 06:59 AM

bita, could you please either upload a zip of your files, or a screenshot of the files in explorer. That way we can make sure your file structure is correct.

This post has been edited by Shane Hudson: 08 February 2012 - 06:59 AM

Was This Post Helpful? 1
  • +
  • -

#24 Dormilich  Icon User is online

  • 痛覚残留
  • member icon

Reputation: 2147
  • View blog
  • Posts: 5,430
  • Joined: 08-June 10

Re: loading image from computer to browser

Posted 08 February 2012 - 07:02 AM

View PostShane Hudson, on 08 February 2012 - 02:59 PM, said:

bita, could you please either upload a zip of your files, or a screenshot of the files in explorer. That way we can make sure your file structure is correct.

it would be nice if the option "hide extension of known files" is unchecked, otherwise we can't see the image file extension.
Was This Post Helpful? 0
  • +
  • -

#25 bita  Icon User is offline

  • D.I.C Head

Reputation: 2
  • View blog
  • Posts: 142
  • Joined: 21-April 09

Re: loading image from computer to browser

Posted 08 February 2012 - 07:25 AM

Both attached files are in a folder named 'html' on my desktop(it doesn't permitted me to attach zip file!!)
And thanks to all for being so helpful.

Attached image(s)

  • Attached Image

Attached File(s)

  • Attached File  img.htm (178bytes)
    Number of downloads: 10

Was This Post Helpful? 0
  • +
  • -

#26 Dormilich  Icon User is online

  • 痛覚残留
  • member icon

Reputation: 2147
  • View blog
  • Posts: 5,430
  • Joined: 08-June 10

Re: loading image from computer to browser

Posted 08 February 2012 - 07:29 AM

if you look at the image name of the uploaded picture, it shows sophia.jpg. I hate to reiterate it but Sho Ke has asked in post #11 if the image name really were sophia.JPEG. so to make it work use
<img src="sophia.jpg" alt="sth" width="600" height="700">

This post has been edited by Dormilich: 08 February 2012 - 07:30 AM

Was This Post Helpful? 1
  • +
  • -

#27 revolutionx  Icon User is offline

  • D.I.C Head

Reputation: 57
  • View blog
  • Posts: 222
  • Joined: 23-July 09

Re: loading image from computer to browser

Posted 08 February 2012 - 07:31 AM

Working fine here, although when I saved the image it saved as a .jpg. Make sure the file extension is the same on your end.

You can turn on show file extensions for known filetypes by doing this: http://windows.micro...name-extensions
Was This Post Helpful? 1
  • +
  • -

  • (2 Pages)
  • +
  • 1
  • 2