4

I have an iframe in my HTML, where i would like to play mpeg/mpg files from local folder, but i can't load the video into the iframe. when i set src="http://www.google.com", it is displayed in the iframe, but if i try src="file:///C:/Documents%20and%20Settings/jgabotero/Desktop/sample.jpg" it doesn't display the image.

How can i set the src property of iframe to point to local files, specially the ones stored in IsolatedStorage?

Thank you in advance.

-- julie

Martin R-L
  • 4,039
  • 3
  • 28
  • 28
julie
  • 41
  • 1
  • 3
  • I have exactly the same problem, except I'm trying to link to a text file on a server. When viewing the page in IE it looks fine, but chrome just shoes a white box. – martinnjensen Sep 16 '10 at 12:28

1 Answers1

1

i think you can't display files in iframe form your computer using file:// its a security issue.

I also think you can't display images in iframe, ue an html or ohp page, to do this, so put the image in a html file, and link the iframe to this html file.

Alexander_F
  • 2,831
  • 3
  • 28
  • 61
  • 1
    yes I thought the same thing, and even if it would be possible a html or php page to call up the image would be better – Christophe Sep 16 '10 at 12:36
  • In Chrome, I can display a simple text file in an IFrame using src="http[...]", but not by using src="file[...]". In IE, however, both methods work just fine (no other browsers tested). – Martin R-L Sep 16 '10 at 13:03