Dynamic Drive DHTML code library!
Dynamicdrive.com

[an error occurred while processing this directive]


.

.

Menu

Search DD
Recommend DD
Help Forums New
DHTML books
Advertising
Contact

Featured Script
Rollover buttons 

Turn regular form buttons into rollover menus with this script!
.

Partners

Free JavaScripts
.

Link to DD

Do you use scripts from Dynamic Drive? Please give something back by linking to us...
.

Home Small4.gif (1046 bytes) Image Effects Small4.gif (1046 bytes) Here

Dynamic image selector with drag n drop IE

Credits: Dynamic Drive
Last updated: 99/03/19

Description: Hi Scott: below is the script you requested. Note that it will only work in IE 4+. The script basically works fine, except that the drag and drop script, after a LOT of alterations to make it work with the image selector, isn't perfect. You'll notice that it sometimes moves the mouse cursor around inadvertantly. We'll try to see if we can fine-tune it this weekend, and post the final results here. I can't make any guarantees though, since programming the drag n drop script is a very completed thing, and we may never get it to work absolutely perfectly. In any event, you can email me at dynamicdrive@yahoo.com if you have questions. And, like I said, if any improvements can be made, the final version will be posted here next Monday (check the last updated note above).

Demo:


Directions

Step 1: Add the below code to the <head> section of your page:


Step 2: Add the below code where you wish the image selector to appear:


The script is very easy to set up. First, change all the values inside the <option> tags to reflect the paths to the images you want shown (you can add or delete <option> tags, depending on how many images you have). Lastly, change the height attribute of the <table> tag to reflect the height required to accommodate the LARGEST image in your gallery (in the demo, 178 pixels).

That's all there is to it!

Recommend Us!
-If you like Dynamic Drive, please recommend us to a friend...

Legend
All- Script works with Netscape 4 AND Internet Explorer 4+
NS- Indicates script works with Netscape 4 (NOT NS 6 yet)
IE- Indicates script works with Internet Explorer 4 and above
NS6!- Temporary index set up on script category pages to indicate script works in NS6


Copyright 1998-2004 Dynamic Drive. Please read Terms Of Use here before using any of the scripts.
Partners: JavaScript Tutorials | JavaScript Reference