We accept safe and secure Credit Card and PayPal Payments.
 
Perl Scripts

All Count
Attachment Mailer
Perl Scripts Build A FAQ Plus
Perl Scripts Clock In Center
eBackup Automated
Easy Poll
eSurvey
Fetch a File
Form Maker
Mailing List Server
MySQL Mate
PDF Creation
QCart
Quick Fix
Quote of the day
Speed Search
Task Manager
Traffic Pack
Upload Plus
Upload Gold
Upload Pro
Website Manager

 
Free Perl Downloads

Free Perl Scripts Main Page
Free Perl Scripts 404 Alerter
AccessLog Viewer
Build A FAQ
PHP Scripts eBackup
Free PHP Scripts ErrorLog Viewer
eVars - Server Info
HT Pass Creator
Upload Lite
Website Manager

 
JavaScripts

Free Java Scripts Alert Boxes
Free JavaScripts Browser Sniffer
Check email
Generators
Slide Show
Sudoku
Window Maker
More...

 
Extra Utilities

ASP Scripts Ascii Codes
Free ASP Scripts Color Picker
Font Finder
HT Pass Creator
Meta Cloak
Meta Magic
Pano Zooms
SlideShow
Server Size

 
Online Tutorials

Free HTML Scripts Glossary
Free HTML Scripts HTML
JavaScript
MySQL
SSI
Build Traffic
Other

 
Miscellaneous

About Us
Graphics
Testimonials
Installations
Latest versions

 
Hawk Eye in Tennis

Should Hawk Eye replace linesmen and lineswomen at all tennis tournaments?







 
View all Polls

Run Polls on your site

Run your own Surveys

 
Store Download FAQs Contact Us Support Programming Policies  
JavaScripts :: Menus and Movers :: Select menu creator

This free javascript will act upon a user selection in one select menu, to create the options in another menu. Works in Netscape 4 and above, IE 4 and above. This example use the "multiple" attribute to show several options at once. You can remove the attribute if you'd like standard drop drop down select menus.

You can control both the value and text portions of each new option. These select menus can also be database driven (dynamically produced using your database) using CGI.


This is the script that creates the new options
<script>
<!--
// Select menu Creator. Written by PerlscriptsJavascripts.com
// prepare possible new values
reps = new Object();
reps[0] = "Select a report ";
reps[1] = "Report A ";
reps[2] = "Report B ";
reps[3] = "Report C ";
reps[4] = "Report D ";

reps_vals = new Object();
reps_vals[0] = "";
reps_vals[1] = "a";
reps_vals[2] = "b";
reps_vals[3] = "c";
	
imgs = new Object();
imgs[0] = "Select an image ";
imgs[1] = "Image A ";
imgs[2] = "Image B ";
imgs[3] = "Image C ";
imgs[4] = "Image D ";

imgs_vals = new Object();
imgs_vals[0] = "";
imgs_vals[1] = "a";
imgs_vals[2] = "b";
imgs_vals[3] = "c";
imgs_vals[4] = "d";
	
// the function that does all the work
function addNewOptions(w) {
  df = document.selForm;
	
  if(w){
    the_array = eval(w);
    the_vals  = eval(w + '_vals');
    df.choose.options.length = 0;
    for(i in the_array){             
      df.choose.options[i] = new Option(the_array[i],the_vals[i]);
      if(document.all){
        df.choose.options[i].style.background = "orange"
      }
    }
  } else {
    for(a = 0; a < df.choose.options.length; a++){
      df.choose.options[a] = new Option("Select a report","");
    }
    df.choose.options.length = 1;
  }
}

// -->
</script>

Place this script near the top of your document

Select All   De-select

Place this HTML code anywhere in your document
Select All   De-select
Speed Search our site
Plesk Hosting
Linux servers with Plesk Control Panel, cgi-bin, crontab manager, Mysql, PHP and ASP.

Linux Hosting Plans from $9.12 per month, includes Plesk Control Panel, MySQL databases, cgi-bin, crontab manager and 50 email accounts.

Discounted Scripts
Subscribe to our periodial newsletter to receive special offers.

Bathroom Hygiene
How often do you thoroughly clean your bathroom?








View all Polls

Run Polls just like this one on your website!


About us | Contact us | Script FAQs | Script Support | Website Hosting | Our Policies | Store | Testimonials
Subscribers log in here. Subscribe to our periodical newsletter for special offers on commercial scripts, hosting, exciting business opportunities, and industry news and events. Our Mailing List Software is powered by Consolidator    
HTML Plain text
©1999 - 2015 All content Copyright PerlScriptsJavaScripts.com Proudly hosted by LinuxHostingPlans.com