Results 1 to 1 of 1

Thread: How to hide the Form select option onmouseout IE6?

  1. #1
    Join Date
    Feb 2008
    Thanked 0 Times in 0 Posts

    Default How to hide the Form select option onmouseout IE6?

    I am trying to figure it out how to to hide in onmouseout the select options of a form. Below is the code I got so far.

    It isn't working in IE6.
    I am stuck with this so any help will be greatly appreciated.
    The z-index is also a problem in IE6.

    Reference page:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    <html xmlns="" xml:lang="es" lang="es">
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
    <script type="text/javascript">
    function hideSelectSearchCon() {
        var selectSearchCon = document.getElementById("catGroup");
    function check_mouse_pos(e) {
        if (typeof e == 'undefined') {
            e = window.event;
        var src = typeof window.event == 'undefined' ? : e.srcElement;
        var opt = { 'SELECT': 1, 'OPTION': 1 };
        if (typeof opt[src.nodeName] == 'undefined') {
            remove_event(document, check_mouse_pos);
    function add_event(obj, func) {
        if (typeof window.addEventListener != 'undefined') {
            obj.addEventListener('mouseover', func, true);
        } else {
            obj.attachEvent('onmouseover', func);
    function remove_event(obj, func) {
        if (typeof window.addEventListener != 'undefined') {
            obj.removeEventListener('mouseover', func, true);
        } else {
            obj.detachEvent('onmouseover', func);
    <body id="home">
    <!-- #search starts  -->
    <div id="search-container">
    	<div id="searchleft"><div id="searchright">
    		<div id="search">
    		<form action="/cgi-bin/dbsearch/displayList.cgi" method="post">
    				<select name="catGroup" id="catGroup" onclick="add_event(document, check_mouse_pos);" style="z-index: -2">
    						<option value="" selected="selected">Todos los Articulos</option>
    						<option value="Maquinas Ejercicio">Maquinas Ejercicio</option>
    						<option value="Material Deportivo">Material Deportivo</option>
    						<option value="Accesorios Deportes">Accesorios Deportes</option>
    						<option value="Mobliario Urbano">Mobliario Urbano</option>
    				<input type="submit" border="0" alt="Buscar" id="btn_search"/>
    <!-- #search ends  -->
    Last edited by jscheuer1; 02-22-2008 at 03:46 PM. Reason: add code foramtting tags


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts