Advanced Search

View RSS Feed

Recent Blogs Posts

  1. Putting text on top of a video

    In July 2010 an enhancement to the YouTube video embed capability became available through a new embed code style. This style uses <iframe> and looks like this:
    <iframe src="http://www.youtube.com/embed/VIDEO_ID?" frameborder="0"></iframe>


    After VIDEO_ID? we can add the normal parameters, like this:
    <iframe src="http://www.youtube.com/embed/VIDEO_ID?start=0&amp;autoplay=1&amp;rel=0&amp;showinfo=0&amp;autohide=0&amp;modestbranding=1&amp;vq=large"
    ...

    Updated 10-14-2012 at 06:10 PM by molendijk

    Categories
    JavaScript & Ajax , CSS related
  2. BG Carousel Links

    I found a fairly easy way to add optional links to the Dynamic Drive Script:

    Background Image Carousel

    First a demo:

    BG Carousel Links - Demo

    Now, how to:

    Using a text only editor like NotePad, add this highlighted style as shown to the bottom of the on page styles (modified from Step 1 on the demo page):

    Code:
     . . . ctedslide div.desc{ /* CSS for currently selected slide's desc div */
    }
    
    div.slide
    ...

    Updated 07-25-2012 at 12:17 AM by jscheuer1 (attach modified version of script, link to demo, update comments in script)

    Categories
    DD Scripts Mods , Post a JavaScript , JavaScript & Ajax
  3. Version 5 Events

    In javascript there are basically two types of events that can be assigned to elements and objects. I classify them as version 4 events (those that were available in Netscape 4 and IE 4), and version 5 events, those that became available starting with IE 5 and presumably NS 5, but the earliest I'm aware of them in NS was NS 6 (I don't recall ever seeing a NS 5 browser).

    Version 4 events are still available in today's browsers and are usually the first ones folks learn about, examples: ...

    Updated 04-05-2012 at 05:26 AM by jscheuer1 (add info)

    Categories
    JavaScript & Ajax
  4. document.getElementById shortcut

    I'm amazed at how many people don't use a very simple shortcut for document.getElementById. This is for all the people who don't use a javascript library like jQuery.

    All you have to do is include this code somewhere on your page

    Code:
    function $(element) {
    return document.getElementById(element);
    }
    Then when you want to use document.getElementById('id'); just type $('id'); instead.

    Example

    Code:
    <html>
    ...
    Categories
    JavaScript & Ajax
  5. Select boxes having javascript in the options

    In non-IE except Google Chrome, we can call functions from inside a select box by putting things like the following in the options:
    <option value="bla" onclick="some_function()"></option>
    <option value="bla" onclick="window.open('http://www.google.com')"></option>
    etc.

    This is not possible in IE and Google Chrome. In an earlier attempt to solve the problem, I created a script based on the idea that ...

    Updated 12-01-2011 at 08:46 AM by molendijk (Corrections in text)

    Categories
    JavaScript & Ajax
Page 1 of 5 123 ... LastLast