Go Back   Dynamic Drive Forums > Blogs
Search Dynamic Drive Forums:

Post a JavaScript Custom, non DD related JavaScripts from other members.
Old

HTML 4.01 Strict Video Include & Chopping Parts from YouTube video's

Posted 09-27-2009 at 10:07 PM by molendijk
Updated 10-02-2009 at 02:29 PM by molendijk (Observation made by jscheuer about title)
Tags add, michal

Perhaps many of you already knew this. I didn't.
HTML 4.01 Strict Video Include:
Code:
<!--[if IE]>
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" style="position:absolute;left:20%; top:20%; height:80%;width:80%">
<![endif]-->
<!--[if !IE]><!-->
<object type="application/x-shockwave-flash" style="position:absolute;left:20%; top:20%; height:80%;width:80%" data="http://swf.tubechop.com/tubechop.swf?vurl=rw1j0NsIIeE&amp;start=164&amp;end=199&amp;cid=28051"
...
molendijk's Avatar
Senior Coders
Views 2689 Comments 5 molendijk is offline Edit Tags
Old

YouTube Chromeless Player

Posted 08-26-2009 at 07:29 PM by molendijk
Updated 08-29-2009 at 02:59 PM by molendijk

It's not directly obvious from this how we can:
- start a movie on page load (question asked by some people on different forums);
- specify the dimensions and position of the movies in percentages;
- make good use of the ytplayer functions.

Autoplay: something like
Code:
function so_start()
{
loadNewVideo('lKq9_kk3Zbc', 20);
}
//IE needs some time
window.onload=setTimeout('so_start()',2000)
Size of movie in percentages...
molendijk's Avatar
Senior Coders
Views 5327 Comments 5 molendijk is offline Edit Tags
Old

Using the Select Box as a Navigation Tool

Posted 08-10-2009 at 01:04 AM by molendijk
Updated 08-12-2009 at 01:20 AM by molendijk

If we want the select box to function as a genuine menu, then a click on a given option (of the select box) must give us the same range of possibilities as does a click on the items of a normal menu. So a click should allow us to go to a new page, to open a popup window, to produce an alert etc.

We can achieve this with the help of a function that has the following general form:
Code:
var which="";
function DoSomethingWithOptionvalue(which) {
var optionValue = document.getElementById(which).options[document.getElementById(which).selectedIndex].value;
...
molendijk's Avatar
Senior Coders
Views 3891 Comments 0 molendijk is offline Edit Tags
Old

Compact Cookie Unit

Posted 06-24-2009 at 01:50 AM by jscheuer1
Updated 06-24-2009 at 02:01 AM by jscheuer1

Cookies are often confusing. Much of the confusion can be eliminated if you know that all cookies are strings. If you want to store an array, function, number, or an object in a cookie, you must convert it to a string before storage and upon retrieval change it back into the object/array/function/number that it was. Cookies are therefore best used for string storage and retrieval. This unit doesn't pretend to eliminate all of the possible confusions that can arise from "when and where in...
jscheuer1's Avatar
No Kidding?
Views 6509 Comments 3 jscheuer1 is offline Edit Tags
Old

Extract external HTML via a hidden text/html-object

Posted 05-05-2009 at 10:32 AM by molendijk
Updated 05-05-2009 at 11:49 PM by molendijk (Correction)

In the head:
Code:
<!--[if IE]>
<script type="text/javascript">
document.write('<object type="text/html" id="object_id" width="0" height="0" data="menu.html"><\/object>');
onload=function(){
document.getElementById('main_page_id').innerHTML = document.getElementById('object_id').object.documentElement.innerHTML;
}
</script>
<![endif]-->
<!--[if
...
molendijk's Avatar
Senior Coders
Views 5947 Comments 1 molendijk is offline Edit Tags

All times are GMT. The time now is 01:24 AM.

Home - Contact Us - Archives - Link to DD - Top 

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.