Biography:

Location: Dayton, OH
College: Cedarville University, Cedarville, OH
Degree: B.A. Management Information Systems (2002)
Certifications: Microsoft Certified Professional (MCP) 2002

Interests:

Music, Playing Guitar, Working on Cars, Home Improvement, Photography, Computers, Website Programming, Driving in the snow, NHL Hockey, Sand Volleyball, Settlers of Catan board game

Favorites:

Foods: Lasagna, Carrot Casserole, Chicken Parmesan
Sports: Hockey, Football, Volleyball, Soccer
Desserts: Peanut Butter Pie, Peanut Butter Passion ice cream
TV Shows: 24, The Office, Heroes, Mythbusters, Top Gear, Fifth Gear, Modern Marvels, Seinfeld, Simpsons


Contact Me:
Use this area to send me a note or message:
Name:
Email:
Comments:
Security Code:

Fun links you should probably check out:


Fun games you might want to play:


Current Code Samples:


Future Code Samples:

  • CAPTCHA form-protection of images using PHP and GD 2.0 library
  • Resizing images using PHP and the GD 2.0 library
  • Rotating images using PHP and the GD 2.0 library
CODE TUTORIAL: Show/Hide SELECT input items with JavaScript
If you've ever experimented with using DIV layers in Internet Explorer, you've probably noticed a rendering flaw in handling layers that allows SELECT dropdown menus to show through any overlying layers, making it the topmost element.

I got frustrated enough with the SELECT menus "punching through" my layers, and decided to write some JavaScript code that can be used to show/hide all SELECT items on the webpage so that your popup layer will display properly.

Here's a sample test showing how this script can show or hide all of the SELECT elements on a page:

           




Here's the JavaScript code:
JavaScript CODE: "input-form.js"
<script type="text/javascript">
function HideSelectboxes()
{
  if (!document.getElementsByTagName)
  { return; }
  var anchors = document.getElementsByTagName("select");

  //  Loop through all <select> elements
  for (var i=0; i<anchors.length; i++)
  {
    var anchor = anchors[i];
    anchor.style.visibility='hidden';
  }
}
function ShowSelectboxes()
{
  if (!document.getElementsByTagName)
  { return; }
  var anchors = document.getElementsByTagName("select");

  //  Loop through all <select> elements
  for (var i=0; i<anchors.length; i++)
  {
    var anchor = anchors[i];
    anchor.style.visibility='visible';
  }
}
</script>
There you have it. How to use JavaScript to show/hide SELECT dropdown menus when you pop up a DIV layer on top.

- Justin Tubbs