| Sign In/My Account | View Cart |
| Article: |
Hi-Res YouTube Hacks | |
| Subject: | Browser Compatibility | |
| Date: | 2008-05-15 01:49:06 | |
| From: | bhurst | |
|
Response to: Browser Compatibility
|
||
|
That prevents the collapse, but the movie still doesn't appear. I finally gave up and opted for this much-less-elegant approach.
|
||
Showing messages 1 through 4 of 4.
Browser Compatibility
function viewTube(triggerID,movieURL,movieWth,movieHt) {
var div = document.createElement('div'); //Create DIV variable
var embedcode = "<object width='" + movieWth + "&autostart=1' height='" + movieHt + "'>";
embedcode += "<param name='movie' value='" + movieURL + "'></param>";
embedcode += "<param name='wmode' value='transparent'></param>";
embedcode += "<embed src='" + movieURL + "&autoplay=1' type='application/x-shockwave-flash' wmode='transparent' width='" + movieWth + "' height='" + movieHt + "'></embed></object>";
div.innerHTML = embedcode; //Assign embedcode to DIV variable
document.getElementById(triggerID).innerHTML = ""; //Clear DIV
document.getElementById(triggerID).insertBefore(div,null); //Insert new DIV content
}