Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8885695
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T21:22:23+00:00 2026-06-14T21:22:23+00:00

I try to display html file inside an iframe. The html file is located

  • 0

I try to display html file inside an iframe.

The html file is located inside a local folder on my server, with the relevant permissions (for example: c:\temp).

I tried:

iframe = document.createElement("iframe");
iframe.src = "file:///c:\temp\a.html";
iframe.style.display = "block";
document.body.appendChild(iframe);

But the content is not displayed inside the iframe.

another solution I tried is to use ajax to display the html inside a div:

$("#DIV").html( *READ HTML TEXT FROM FILE *)

But the problem here is that I have pictures and css file included inside the html page, and they can’t be displayed because the current location is my web site (they are included in c:\temp folder with the html).

Does anyone have an idea how can I display html page with images inside an iframe?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T21:22:24+00:00Added an answer on June 14, 2026 at 9:22 pm

    The problem is that the browser sees that file:///c:\temp\a.html as a file local to the browser, so it points to the C: drive of the visitor.

    You can set up that local folder to be a Virtual Directory of your website (in IIS) and refer to the file using the correct web-path (http://…). That way you don’t move the folder but it is still available through the webserver.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In My Iphone app I display a local HTML file into a UIWebView. Inside
I'm trying to get a local HTML file to display within a WebBrowser in
I try to display JSON data in html file with jQuery. But in html
I'm reading an html file like this: try { BufferedReader bufferReader = new BufferedReader(new
I'll try to be clear in the question,i need to display HTML content on
I am trying to display HTML files (containing local images) in a WebBrowser control.
When I try to display letters of a foreign languages in my php file
I try to load a .swf file from assets folder to a webview, but
I'm try display data from column points , SELECT * from table ORDER by
I am using the following code to try and display in a time in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.