'DHTML Code' Category

September 7th, 2007

How to rotate an image or text with JavaScript & DHTML

So I need to rotate an image every few seconds on a homepage of a site I'm building. I looked around for some pre-built code that I could do this with, and I found a few functions. I picked the one I like the best, and I've modified it to my needs. This JavaScript code [...]

February 19th, 2007

How to set an iframe to 100% height in FireFox

Here's the HTML code to implement if you'd like to embed another web page in an iframe on your web site, but would like it to appear as the entire page. This makes it hard to detect that the page is within an iframe. It's easy to do in IE, just set the iframe height [...]

November 29th, 2006

How to embed a .wmv file in a webpage

Ever wanted to have a .wmv file play automatically when a user visits your website? This is how you'd do it. Each embedded player instance on your Web page needs the object definition to clarify which version of the Windows Media Player will be called. This is identified by both the CLSID reference and the [...]

November 3rd, 2006

How to load XML data with JavaScript (AJAX tutorial)

The latest technology (or grouping of technologies) sweeping the web is AJAX (Asynchronous JavaScript And XML). This technology, using the XMLHttpRequest() object to retrieve a piece of XML in the background, and load its contents into the web page dynamically, thus creating a constantly refreshed Dynamic HTML (DHTML) interface.
You can make very complication AJAX [...]

October 8th, 2006

Make an object stay on the page when scrolling

It's pretty common to see a nav bar or some persistent menu/object floating on a web page as you scroll dow it. Well here's the code to do that yourself. You can set the specific location for the floating object, and when the web page is scrolled down or up the object will float to [...]

Next Page »