A Simple JavaScript Drop Down Menu
This is an extremely versatile drop down menu script for ordinary links on your page, including image links. It can be activated either onMouseover or onClick. The menu intelligently determines whether the dropped menu is too close to the browser’s edge, adjusting its positioning so it’s always in view. This script works in all the major DHTML browsers-...
Read MoreCreating Add to Favorites link with JavaScript
Have you ever been to a site that has a link to add the site to your favorites? Have you ever wondered how that works? Here, I will explain how to make a quick and efficient “Add to Favorites” link with JavaScript. Let us first see the advantages of adding such a link: If visitors really like your site, they can easily add it to their favorites list through the normal process –...
Read MoreRandom Text and Image Display with JavaScript, Part 3
Here is the third and final part to my Random Text and Image Display with JavaScript Tutorial. Displaying a random image on a web page using JavaScript involves the following steps: Listing the images you plan to display Storing the names of these images in an array Using the Math.random() method to obtain a random value Rounding the random number to an integer using Math.floor() Displaying...
Read MoreRandom Text and Image Display with JavaScript, Part 2
As promised, here is the second part of my three part Javascript Tutorial. Now that you know how to randomly display text, we’ll see how we can display this text as a marquee (using the <MARQUEE> tag) in Internet Explorer or make this text blink (using the<BLINK> tag in Netscape Communicator). The first step is to make a browser detection script. Depending on the browser, we...
Read MoreRandom Text and Image Display with JavaScript, Part 1
This is Part One of what will be a Three Part JavaScript Tutorial. So let’s begin with Part One. This little JavaScript tip involves randomly displaying a text string from a list. And this is how we shall be going about it: Create a new array and store the list of text strings in it Use the JavaScript Math.random() method to obtain a random number Convert the random number into an...
Read More