Embedding Windows Media Player on your Webpage
 

Using "Dynamic Ajax Content"

Found at DynamicDrive.com

 

Description: This script uses Ajax to enable you to load external pages into a DIV without having to reload the browser or use IFRAMES. If your external pages reference any external .css or .js files for styling, this script can also load and apply them to the page on demand.

Note: Due to security limitations, the external pages loaded must be from the same domain as the encompassing page. Any external .css and .js files associated with these pages, however, can be from any domain.

 

FUNNY VIDEOS

 

Trunk Monkey - Angry Driver

Trunk Monkey - Delivers a Baby

Trunk Monkey - Kids Throwing Eggs

Trunk Monkey - Bribing a Cop

Trunk Monkey - Car Security System

Trunk Monkey - Chaperone Addition

 

Click on a link to the left to play

 

 

To create this page, I followed the instructions included at the above link. 

 

You can also view the source code of this page to see how it all works.  Note - I opted to include the javascript as a separate file, referenced in the head.

 

The above example is created with one table that has two cells (outline in black).  The left cell contains the hyperlink options, and the right cell contains another table (id="ajaxframe") that will be for viewing the videos (thick red outline).  The right cell is vertically aligned to the top, so the video table will stay near the top. 

 

Note - In lieu of setting the <div id="contentarea"><p><b>Click on a link to the left to play</b></p></div> just inside the right cell, I opted to add the (id="ajaxframe") table so that I can lock the size to 320px wide x 280px high.  This is the size of the Windows Media Player that will be viewed.  However, for this example I made the table 324 x 284 to compensate for the thick red border, where normally I would omit the thick border altogether.

 

Since the referenced .htm files contain the embedded media player and it is set to play automatically, the video will start as each link is activated.  Click here to see an example page.  To see the basic instructions on how to do this, please reference my original method "Embedding Windows Media Player on your Webpage".  Originally, I accomplished the same thing as this example, but used Frontpage's inline frame feature.

 

There are a number of ways to hyperlink to the video files and my example above includes two methods. 

 

Good luck, Ed

 

July 21, 2006
 

HTML 4.01 Valid