Jump to content

Next Video Within The <td></td> Tag.


amitamberker

Recommended Posts

Hey Chibineku,Here I go...

I have attached the new version of prefinal.html, called prefinal2.html.Hope this is some help to you,
Unfortunately I did not get the new version of "prefinal2.html" attachment file. Could you please re-send it? Or perhaps you can ZIP it and send me the Zip Folder instead of sending the .html format file.
I had a look at prefinal.html, and you had changed the button names but not their onclick functions, so I've swapped that, and got rid of the test <spans>, altered a little of the code so it's more elegant, and added a couple of lines that mean if the array of videos is at an end, you can't keep clicking the button.
Okay.
If you ever want to add more videos, just copy the format of the array at the top of the script (vidArr[3]="http://www.youtube.com/watch?v=pxzcTTpPSs0", making sure to take out the "watch=" line and slashes from the url).
Okay cool. Gotch you.
I couldn't get your other file to open....I got an error about the urchin cookie.
So do you mean to say that you was unable to download and open the "poll_dance.html" file? Am I making sense? OR anyways... Nevermind. I will make a different post for it.
I relied on your code for the actual embedding of videos, since it's something I haven't done before, so I can't really help you there.
Okay. No Worries. I will make a NEW POST and perhaps someone might help me. But however - You keep an eye on that post.So let's try to resolve this post. Please send the modified version of prefinal2.html file.
Link to comment
Share on other sites

<html><head><title>Testing</title><script type="text/javascript">var vidArr=new Array()vidArr[0]="http://www.youtube.com/v/4G6U4pNHeaM&hl=en&fs=1"vidArr[1]="http://www.youtube.com/v/mzr7PWSrZ3A"vidArr[2]="http://www.youtube.com/v/vzXkmxxPf04"vidArr[3]="http://www.youtube.com/v/pxzcTTpPSs0"var nextVid=0function advanceVid() {nextVid++if (parseInt(nextVid)<vidArr.length) {nextvid=parseInt(nextVid)document.getElementById("display").src=vidArr[nextVid]}}function reverseVid() {nextVid--if (parseInt(nextVid)<vidArr.length) {nextvid=parseInt(nextVid)document.getElementById("display").src=vidArr[nextVid]}}</script></head><body><table style="width: 700px" cellspacing="0" cellpadding="0" align="center"><tr><td width="350" valign="top">Blah... Blah... Blah... Blah... Blah... Blah... Blah... Blah... Blah... Blah... Blah...Blah... Blah... Blah... Blah... Blah... Blah... Blah... Blah... Blah...Blah... Blah... Blah... Blah... Blah... Blah... Blah... Blah... Blah...Blah... Blah... Blah... Blah... Blah... Blah... Blah... Blah... Blah...Blah... Blah... Blah... Blah... Blah... Blah... Blah... Blah... Blah...Blah... Blah... Blah... Blah... Blah... Blah... Blah... Blah... Blah...Blah... Blah... Blah... Blah... Blah... Blah... Blah... Blah... Blah...Blah... Blah... Blah... Blah... Blah... Blah... Blah... Blah... Blah...<br><br>Blah... Blah... Blah... Blah... Blah... Blah... Blah... Blah... Blah...Blah... Blah... Blah... Blah... Blah... Blah... Blah... Blah... Blah...Blah... Blah... Blah... Blah... Blah... Blah... Blah... Blah... Blah...</td><td width="350"><embed id="display" src="http://www.youtube.com/v/4G6U4pNHeaM&hl=en&fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="320" height="265" /><br /><br /><input type="button" onclick="advanceVid()" value="Next Video" /><span style="padding-left:115px"><input type="button" onclick="reverseVid()" value="Previous	 Video" /></span><span id="test"></span><br /><span id="testSrc"></span><br />Blah... Blah... Blah... Blah... Blah... Blah... Blah... Blah... Blah...Blah... Blah... Blah... Blah... Blah... Blah... Blah... Blah... Blah...Blah... Blah... Blah... Blah... Blah... Blah... Blah... Blah... Blah...</td></tr></table><br /></body></html>

Link to comment
Share on other sites

Chibineku,The BUTTONS are not working... CHECK IT HERE

<html><head><title>Testing</title><script type="text/javascript">var vidArr=new Array()vidArr[0]="http://www.youtube.com/v/4G6U4pNHeaM&hl=en&fs=1"vidArr[1]="http://www.youtube.com/v/mzr7PWSrZ3A"vidArr[2]="http://www.youtube.com/v/vzXkmxxPf04"vidArr[3]="http://www.youtube.com/v/pxzcTTpPSs0"var nextVid=0function advanceVid() {nextVid++if (parseInt(nextVid)<vidArr.length) {nextvid=parseInt(nextVid)document.getElementById("display").src=vidArr[nextVid]}}function reverseVid() {nextVid--if (parseInt(nextVid)<vidArr.length) {nextvid=parseInt(nextVid)document.getElementById("display").src=vidArr[nextVid]}}</script></head><body><table style="width: 700px" cellspacing="0" cellpadding="0" align="center"><tr><td width="350" valign="top">Blah... Blah... Blah... Blah... Blah... Blah... Blah... Blah... Blah... Blah... Blah...Blah... Blah... Blah... Blah... Blah... Blah... Blah... Blah... Blah...Blah... Blah... Blah... Blah... Blah... Blah... Blah... Blah... Blah...Blah... Blah... Blah... Blah... Blah... Blah... Blah... Blah... Blah...Blah... Blah... Blah... Blah... Blah... Blah... Blah... Blah... Blah...Blah... Blah... Blah... Blah... Blah... Blah... Blah... Blah... Blah...Blah... Blah... Blah... Blah... Blah... Blah... Blah... Blah... Blah...Blah... Blah... Blah... Blah... Blah... Blah... Blah... Blah... Blah...<br><br>Blah... Blah... Blah... Blah... Blah... Blah... Blah... Blah... Blah...Blah... Blah... Blah... Blah... Blah... Blah... Blah... Blah... Blah...Blah... Blah... Blah... Blah... Blah... Blah... Blah... Blah... Blah...</td><td width="350"><embed id="display" src="http://www.youtube.com/v/4G6U4pNHeaM&hl=en&fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="320" height="265" /><br /><br /><input type="button" onclick="advanceVid()" value="Next Video" /><span style="padding-left:115px"><input type="button" onclick="reverseVid()" value="Previous	 Video" /></span><span id="test"></span><br /><span id="testSrc"></span><br />Blah... Blah... Blah... Blah... Blah... Blah... Blah... Blah... Blah...Blah... Blah... Blah... Blah... Blah... Blah... Blah... Blah... Blah...Blah... Blah... Blah... Blah... Blah... Blah... Blah... Blah... Blah...</td></tr></table><br /></body></html>

Link to comment
Share on other sites

It is working for me in Firefox 3. Which browser are you testing in?
Really? I am using IE 7. Does it take time to reach to Next or Previous Video?
Link to comment
Share on other sites

For the moment, I think you can get rid of all thise parseInt() functions. They aren't necessary, since you're only adding integers to the variable anyways.Also, javascript variables are case sensitive. Change nextvid for nextVid.After some investigation, I've found that Internet Explorer may change the src attribute of the <embed> element, but doesn't change the embedded content itself. It's probably best if you reload the page using PHP to put the URL in the <embed> element. (Though I really recommend using the <object> element instead, since <embed> isn't standard)

Link to comment
Share on other sites

For the moment, I think you can get rid of all thise parseInt() functions. They aren't necessary, since you're only adding integers to the variable anyways.
I had problems early in writing this, which seemed to be sorted by using parseInt, but it's worth trying, since I also had many other errors going on.
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...