www.webdeveloper.com
Results 1 to 2 of 2

Thread: Drop-Down Not Coming In Focus/JS Problem?

  1. #1
    Join Date
    Nov 2008
    Posts
    2

    Question Drop-Down Not Coming In Focus/JS Problem?

    I am helping a friend develop her website. We use a javascript gallery which allows them to click on each image to view a larger image. It also displays text and a form with each item where they can choose product options, add to cart,etc. In IE, the product options drop-down box is not functioning. (it works great in firefox, chrome, opera) When you choose and option with a mouse-click, it does not stay in focus or clicked but reverts back to the default. (you can choose it with a keyboard stroke) I am not a developer so please excuse any wrong terms I have used. Thanks for any help you can give me!

    "Gallery" java script:
    Code:
    clickMenu = function(menu) {
    	var getEls = document.getElementById(menu).getElementsByTagName("LI");
    	var getAgn = getEls;
    
    	for (var i=0; i<getEls.length; i++) {
    			getEls[i].onclick=function() {
    				for (var x=0; x<getAgn.length; x++) {
    				getAgn[x].className=getAgn[x].className.replace("click", "");
    				}
    				this.className+=" click";
    				}
    			}
    		}
    Partial HTML:
    Code:
    <div id="gallery">
    <ul>
      <li><i><img src="images/Products/Baby/Pinkplate.jpg"
     alt="Art of the Spirit Pink Ceramic Plate"></i><span><b>Art
    of the Spirit Pink Ceramic Plate</b><br>
    A wonderful and personal baby gift! A treasure to hang in her room.
        <div class="product-options clearfix">
        <form id="addToCartForm" method="post"
     action="http://www.shop.katecarlyle.com/addtocart.sc"><input
     name="productId" value="4" type="hidden">
          <table class="product-options-table" border="0">
            <tbody>
              <tr>
                <td class="label">
                <em>Gift Wrap?</em>
                </td>
                <td class="field">
                <select>
                <option value="No">No </option>
                <option value="Yes">Yes </option>
                </select>
                </td>
              </tr>
              <tr class="buynow">
                <td class="label">
                </td>
                <td class="field">
                <input value="Add To Cart" class="btn"
     type="submit"></td>
              </tr>
            </tbody>
          </table>
        </form>
    $58
        </div>
        </span></li>

  2. #2
    Join Date
    Nov 2008
    Posts
    2

    Anyone?

    I took the form out of the "gallery" and it functions in IE7 so I know it's something to do with the Javascript. Any help would be greatly appreciated!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

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



Recent Articles