I'm hoping someone can help me with this situation. I am a developer working on a project that has a video voting page.
The situation is this:
The parent page has an iFrame ( named iFrame1 ) and it is supposed to load in an external .html page that has a flash video in it. The external .html page is supposed to load when a user clicks on a thumbnail image on the parent page. There are 20 external .html pages that a user can load in by clicking on the associated thumbnail on the parent page. I am using JavaScript to tell it to load the next .html page because the parent page has .asp code in it for a voting mechanism.
The code for the thumbnail is:
[HTML]<div align="left">
<a href="javascript:loadVid('video1.html')"><img src="assets/VC01t.jpg" width="97" height="55" border="0" onClick="hidLastVideoPlayed.value='video1.html'"/></a>
[/HTML]
The JavaScript code in the external file ( iFramevid.js ) is:
Expand|Select|Wrap|Line Numbers
- function loadVid(iFrameURL)
- {
- iFrame1.location.href = iFrameURL;
- }
"iFrame1 is not defined" and it shows the line 'iFrame1.location.href = iFrameURL;'
It doesn't load the .html document in the iFrame. I just get the error.
I also get another error:
hidLastVideoPlayed is not defined
loadVid("video3.html")
Does anyone know how to get around this or fix it? I'm perplexed. It would be one thing if it didn't work in IE.
Thanks in advance!
djlender