Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Display HTML page inside iFrame onClick of image

Status
Not open for further replies.

newdeveloper2010

Programmer
Aug 2, 2010
1
US
Hi,

I am new to web development. I have a HTML file that plays video (this file was created using Camtasia) using iFrame in a HTML page. This video is auto play on the visitors first visit. When they come back again, I set cookie to display a static image and play the video onclick on the image.

How do I display the HTML file inside iFrame on click on the image? I changed the image into .swf file and made the call to the HTML file. But the HTML file opens in a new window. My need is to open the HTML file inside the iFrame onclick on the image.

Appreciate your help.
 
Change the iframe's src property to point to the html file that holds the movie.

document.frames.iframename.src="htmlfile.html"

----------------------------------
Phil AKA Vacunita
----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.

Behind the Web, Tips and Tricks for Web Development.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top