The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Pop Out videos aren't loading correctly, Videos aren't loading the correct video.
Still New At This
post Apr 4 2013, 10:55 AM
Post #1





Group: Members
Posts: 2
Joined: 4-April 13
Member No.: 18,956



I was asked by my boss to change our post production page around a bit. He requested having our videos pop out in a new window from clicking on a image thumbnail. I figured out how to work everything out but when the thumbnail is clicked, it doesn't load the correct video. It only loads the last video inserted into the HTML.

I know basic HTML etc from learning on my own and playing around with tumblr and livejournal etc.
I'm using Dreamweaver MX. I upload everything through our FTP server.
You can check out the page here: http://cmdnyc.com/audio-production.php


Can someone please let me know what i'm doing wrong so I can fix this?


This is the code that I'm using...also, if you press ctrl + u, you can see the whole code for the page ( just in case.)

<head>

<script type="text/javascript">

function openpopupvideo() {
windowhandle=window.open("", "newwin", "height=300, width=500");

windowhandle.document.write('<title>MLB Perfection</title>');

windowhandle.document.write('<embed src="html/movies/MLB Perfection.mov" </embed> autoplay="false" width="427" height="260">');

}

</script>

<input name="image" type="image" onClick="openpopupvideo();" value="Click here to see pop-up" src="images/MLBPER1.png" alt=""width="199" height="162"img />

</body>
</p>
<td bgcolor="#e4e4e4"><p>
<html>

<head>

<script type="text/javascript">

function openpopupvideo() {
windowhandle=window.open("", "newwin", "height=300, width=500");

windowhandle.document.write('<title>Howard TV</title>');

windowhandle.document.write('<embed src="movies/HTV.mov" autoplay="false" width="427" height="260"></embed>');

}

</script>

<input name="image" type="image" onClick="openpopupvideo();" value="Click here to see pop-up" src="images/HTV.png" alt=""width="199" height="162"img />

</body>
</p>

<td bgcolor="#e4e4e4"><p>
<html>

<head>

<script type="text/javascript">

function openpopupvideo() {
windowhandle=window.open("", "newwin", "height=300, width=500");

windowhandle.document.write('<title>Turkey Boxing</title>');

windowhandle.document.write('<embed src="movies/Boxing.mov" autoplay="false" width="427" height="260"></embed>');

}

</script>

<input name="image" type="image" onClick="openpopupvideo();" value="Click here to see pop-up" src="images/Boxing.png" alt=""width="197" height="163"img />

</body>




Thanks!
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Christian J
post Apr 4 2013, 05:47 PM
Post #2


.
********

Group: WDG Moderators
Posts: 9,653
Joined: 10-August 06
Member No.: 7



I recommend that you start fixing the HTML syntax errors: http://www.htmlhelp.com/cgi-bin/validate.c...-production.php
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Darin McGrew
post Apr 5 2013, 09:31 PM
Post #3


WDG Member
********

Group: Root Admin
Posts: 8,365
Joined: 4-August 06
From: Mountain View, CA
Member No.: 3



QUOTE
function openpopupvideo() {
[...]
function openpopupvideo() {
[...]
function openpopupvideo() {
Each declaration of openpopupvideo() overwrites the previous one.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Still New At This
post Apr 6 2013, 11:07 AM
Post #4





Group: Members
Posts: 2
Joined: 4-April 13
Member No.: 18,956



QUOTE(Darin McGrew @ Apr 5 2013, 10:31 PM) *

QUOTE
function openpopupvideo() {
[...]
function openpopupvideo() {
[...]
function openpopupvideo() {
Each declaration of openpopupvideo() overwrites the previous one.



got it. how would I go about fixing this? is there a code where it won't overwrite the other?

thanks so much!
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Darin McGrew
post Apr 6 2013, 12:58 PM
Post #5


WDG Member
********

Group: Root Admin
Posts: 8,365
Joined: 4-August 06
From: Mountain View, CA
Member No.: 3



Well, you could create multiple functions, each with a different name. Or you could create a single function that accepts a parameter, using the parameter to determine which video to open.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 19th April 2024 - 12:58 PM