0
votes

I have the code here: function cbfunca(datas){ var videoRefs = (datas.value.items[0].content); var frames = 'http://www.youtube
nocookie.com/v/'+videoRefs+'?version=3&hl=en_GB&rel=0\"
type=\"application/x-shockwave-flash\" width=\"560\" height=\"349\">'; var curtextvals = document.getElementById("pumps"); curtextvals.innerHTML = (frames); } Video Should Be Here, If you see this, you did something wrong

_id=f261e19584a4dd5cb0a61386b24e80bf&_render=json&_callback=cbfunca">

the second code here: function cbfunc(data){ var videoRef = (data.value.items[0].content); var frame = 'http://www.youtube-
nocookie.com/v/'+videoRef+'?version=3&hl=en_GB&rel=0\" type=\"application/x-shockwave- flash\" width=\"560\" height=\"349\">'; var curtextval = document.getElementById("pump"); curtextval.innerHTML = (frame); } Video Should Be Here, If you see this, you did something wrong

The First one always Doesn't appear? how might i fix this? Sorry the code doesn't seem to come up right here.

1
In your code the urls are not the same: the first one is missing a "-". You wrote www.youtubenocookie.com for the first one and www.youtube-nocookie.com for the second.Als
@als i did that on accident when i tried to please stackoverflows system by making it code.joeybab3
heres the whole code linkjoeybab3
To find out how to put code here in your question, see help: "prefix each line with 4 spaces" or use the Ctrl+k after code-text selection. Anyway, i tried the code from your link. There was missing a "/v/", after which it runs and shows 2 videos on the webpage. However, this "/v/" is present in the code above. I'll put the code that works for me in an answer here.Als

1 Answers

1
votes

Code from your link that works for me (it does show 2 videos on the webpage); after adding a "/v/" on the second iframe url.

<td bgcolor="#FFFFFF" valign="middle" align="center"colspan="2" class="dty"><span class="t">Most Recent Video</span>
<script type="text/javascript">
function cbfunc(data){
var videoRef = (data.value.items[0].content);
var frame = '<iframe class=\"embeddedvideo\" src=\"http://www.youtube-nocookie.com/v/'+videoRef+'?version=3&hl=en_GB&rel=0\" type=\"application/x-shockwave-flash\" width=\"560\" height=\"349\"></iframe>';
var curtextval = document.getElementById("pump");
curtextval.innerHTML = (frame); 
}
</script>
<div id="pump">Video Should Be Here, If you see this, you did something wrong</div>
<p>
<script src="http://pipes.yahoo.com/pipes/pipe.run?_id=35717280d4cd32a61acd1a36f09635c5&_render=json&_callback=cbfunc">
</script>
       </th>







       </tr>    <tr>
       <td bgcolor="#FFFFFF" valign="middle" align="center"colspan="2" class="dty"><span class="t">Most Recent Minecraft Video</span>
<script type="text/javascript">
function cbfunca(datas){
var videoRefs = (datas.value.items[0].content);
var frames = '<iframe class=\"embeddedvideo\" src=\"http://www.youtube-nocookie.com/v/'+videoRefs+'?version=3&hl=en_GB&rel=0\" type=\"application/x-shockwave-flash\" width=\"560\" height=\"349\"></iframe>';
var curtextvals = document.getElementById("pumps");
curtextvals.innerHTML = (frames); 
}
</script>
<div id="pumps">Video Should Be Here, If you see this, you did something wrong</div>
<p>
<script src="http://pipes.yahoo.com/pipes/pipe.run?_id=f261e19584a4dd5cb0a61386b24e80bf&_render=json&_callback=cbfunca">
</script>