how to set iframe src to local file - iframe

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

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.

Related

Inserting swiffy converted html5 into webpage

I converted swf files from my static html website into html5 with swiffy. But I don't know how to insert them in webpage so that they look exactly like swf files. I used iframe but it makes block of inserted html5 file instead of merging it with background color.
Please check original website
www.coldhousellc.com
I am currently trying on its white logo.
Thank you for help.

Stop iframe autoplaying with mp4 files

I want to stop a .mp4 file in an iframe from autoplaying.
The code is simple:
var siteVidUrl = document.createElement("iframe"); // create iframe
siteVidUrl.src = Obj.URL + "?autoplay=0"; // create src attribute for iframe
link_col.appendChild(siteVidUrl); // append to DOM
An example of Obj.URL would be
media.website.com/theVideo.mp4
The video contines to autoplay, despite my best attempts. As you can see, I am appending "?autoplay=0", to the end of the src attribute URL, but no luck there. I have read a bit about the video HTML5 tag, but no luck there either...
The majority of the videos are .mp4 files.
Can anyone point me in the right direction?
Is it necessary to use an iframe for this? If not have look at the HTML5 video-tag: https://www.w3schools.com/htmL/html5_video.asp
If the iframe is needed (for any reason), you could set the src to a page which receives the URL of the video as a parameter and just produces the HTML containing a simple video-tag in it. This way you'll be able to control the video playback and disable autoplay.

HTML editor and image upload to server

In asp.net, when we work with any html editor, I often include images and text. How will images upload to a specific folder in the server and be saved as a relative path in the db. I Need this concept for a CMS.
I was using CKEditor first but it was found a bit difficult to work with asp.net. So I moved to obout editor. I think your problem can be solved with obout html editor. check this link, obout.com - Html Editor - Image upload
Why do you need to store the image's relative path in the DB ? As there is no need, because the content html is saved in the DB and when you the retrieve that content that particular image will be shown in the content.
As far as I have used CK Editor, there is some setting required in the config file to set the path where the images are stored when user adds images in content.

Output html that's transparent

My site supports exporting data in a few ways, and one way i via iframe.
<iframe src ="http://www.conanstats.com/Feeds/IFrame.aspx?Guild=30&EventCount=15" width="270" height="400">
<p>Your browser does not support iframes.</p>
</iframe>
Currently the problem is that when it's shown in a web site it's going to have its own style, is there any ways for it to inherit the style from the page it's being shown in. Or do I need to make url arguments to make this happen
An iframe is technically a different browser window with its own DOM and associated CSS imports. If you want to style the iframe's content put the CSS you would like to use in the file the src property is pointing to.
If it is pointing towards an ASP file change it in there.
You could have your page take a parameter which it then uses to decide which local style sheet to load...

Load aspx in div or adjust the size of an iframe

I have an htm file with an iframe and a menu structure. The menu can load an htm file in the iframe or an aspx file. No problem at all.
But... Now they want the iframe to get the size of its content. (So there will be no scrollbar in the iframe, but you have to scroll the whole htm file.)
I didn't get this to work so I thought I would use a div for this issue. But I can't get the aspx file to load in a div.
So I'm stuck. Either I have to find a way to let my iframe grow or I have to find a way to load an aspx file in a div.
Placing the remote content directly in a div will be the easiest here, otherwise you will have to try and automatically size the iframe after the page loads, and it might even change height after that too.
To load HTML content from a remote source into a div you will need to look at the XML HTTP Objects exposed to the browser via javascript.
It sounds like you are not familiar with the concept so I would advise using a Javascript library like jQuery to help you along.

Resources