[b] HELP!!![/b]I have this code already on my js extension and they're working, but i want to add another box with youtube content again...I also have a WVM sidebar and chatbox too!
[b]If I use the same add sidebar with youtube content code nothing happens...[/b]
[quote]//add sidebar script
function addSideBar(head,htm,div_id) {
var browser=navigator.appName;
var mic="Microsoft Internet Explorer";
var innerHtm=htm;
var cont="<div id='"+div_id+"' class='commonbox "+div_id+"'>"+
"<div class='commonbox'>"+
"<h2>"+head+"</h2>"+
innerHtm+
"</div>"+
"</div>";
if (browser==mic){
var obj=parent.document.createElement("<li>");
var x=parent.document.getElementById("friends_2_2");
x.parentNode.parentNode.appendChild(obj);
obj.innerHTML=cont;
}
else
{
var obj=parent.document.createElement("li");
obj.innerHTML=cont;
var x=parent.document.getElementById("friends_2_2");
x.parentNode.parentNode.appendChild(obj);
}
}
//
if (!attachOnLoadHandler(function(){editContent200()})) parent.onload = function(){editContent200()};
function attachOnLoadHandler(func)
{
if(parent.attachEvent)
{
parent.attachEvent('onload',func);
return true;
}
if(parent.addEventListener)
{
parent.addEventListener('load',func,false);
return true;
}
return false;
}
function editContent200() {
var youtube7="<div align='center' id='youtube'>"+
"<object width='80%' height='370'><param name='movie' value='http://www.youtube.com/p/08722409DA0BC314'></param><embed src='http://www.youtube.com/p/08722409DA0BC314' type='application/x-shockwave-flash' width='90%' height='200'></embed></object>"+
"</div>";
addSideBar("FEAUTURED VIDEO",youtube7,"ul_youtube_content");
}
function addSideBar(head,htm,div_id) {
var browser=navigator.appName;
var mic="Microsoft Internet Explorer";
var innerHtm=htm;
var cont="<div id='"+div_id+"' class='commonbox "+div_id+"'>"+
"<div class='commonbox'>"+
"<h2>"+head+"</h2>"+
innerHtm+
"</div>"+
"</div>";
if (browser==mic){
var obj=parent.document.createElement("<li>");
var x=parent.document.getElementById("friends_2_2");
x.parentNode.parentNode.appendChild(obj);
obj.innerHTML=cont;
}
else
{
var obj=parent.document.createElement("li");
obj.innerHTML=cont;
var x=parent.document.getElementById("friends_2_2");
x.parentNode.parentNode.appendChild(obj);
}
}y
//[/quote]
I also have a WVM sidebar and chatbox too
Last edited by diabolicious (2007-07-05 03:56:25)