Categories:

Home / Free JavaScripts / Combo Boxes / Here

Cut & Paste Always-visible combo box

Credit: JavaScript Kit

Script updated: Jan 24th, 07' to use CSS's "fixed" positioning method instead.

Description: This combo box menu never leaves the user's screen as it appears always in view (in IE7+, Opera 8+ and Firefox that is). Legacy browsers such as IE5 and IE6 will simply not see the menu at all. You can specify the location of the menu relative to the four edges of the window: "top left", "top right", "bottom left" or "bottom right".

Example:

Go

Directions:

Step 1: Insert the below into the <HEAD> section of your page.

You can configure the location of the combo box relative to the viewable window inside the code of Step 1. The 4 possible locations are "top left", "top right", "bottom left" and "bottom right".

Step 2: Add the below combo box HTML to the <BODY> of your page:

Change the URLs inside the combo box to your own.

Finally, note that your page must contain a valid doctype declaration at the very top in order for this script to work in IE7! For example:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">


JavaScript Tools:
Site Info


CopyRight (c) 2018 JavaScript Kit. NO PART may be reproduced without author's permission. Contact Info