Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. JavaScript
  4. DropDown onchange event is not working in IE

DropDown onchange event is not working in IE

Scheduled Pinned Locked Moved JavaScript
helpquestion
5 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    Nandan Basak
    wrote on last edited by
    #1

    DropDown onchange event table row will be visible/invisible is not working in IE8 but in chrome its working fine.the code in given below. plz help me...is there any wrong in this code?....Thanks in advance.......

    var $ = Object.prototype.$ = function(id){ return document.getElementById ? document.getElementById(id) : document.all ? document.all[id] : null };
    function showHideTableRow(tr, show){
    if(!tr){ return false; }
    try{
    tr.style.display = (show) ? '' : 'none';
    return true;
    }
    catch(e){
    tr.style.display = (show) ? '' : 'none';
    return true;
    }
    }
    function selAction(sel){
    for(var i=0; i

    T D 2 Replies Last reply
    0
    • N Nandan Basak

      DropDown onchange event table row will be visible/invisible is not working in IE8 but in chrome its working fine.the code in given below. plz help me...is there any wrong in this code?....Thanks in advance.......

      var $ = Object.prototype.$ = function(id){ return document.getElementById ? document.getElementById(id) : document.all ? document.all[id] : null };
      function showHideTableRow(tr, show){
      if(!tr){ return false; }
      try{
      tr.style.display = (show) ? '' : 'none';
      return true;
      }
      catch(e){
      tr.style.display = (show) ? '' : 'none';
      return true;
      }
      }
      function selAction(sel){
      for(var i=0; i

      T Offline
      T Offline
      twseitex
      wrote on last edited by
      #2

      styles of object table only IE are e.g. style.display display Sets or retrieves whether the object is rendered. style.visibility visibility Sets or retrieves whether the content of the object is displayed. visibility only IE visibility Attribute | visibility Syntax HTML { visibility : sVisibility } Scripting object.style.visibility [ = sVisibility ] sVisibility String "inherit" Default "visible" "hidden" Example 1 .vis1 { visibility:visible } .vis2 { visibility:hidden }

      Move the mouse over this text to make the sphere disappear.

      Example 2 function disappear() { oSphere.style.visibility="hidden"; } function reappear() { oSphere.style.visibility="visible"; } Move the mouse over this text to see the sphere disappear. display only IE display Attribute | display Syntax HTML { display : sDisplay } Scripting object.style.display [ = sDisplay ] sDisplay String "block" IE 5.x and above "none" "inline" "inline-block" "list-item" "table-header-group" "table-footer-group" default is "inline" but default is block for ADDRESS BLOCKQUOTE BODY CENTER COL COLGROUP DD DIR DIV DL DT FIELDSET FORM Hn HR IFRAME LEGEND LI unter IE 6.x LISTING MARQUEE MENU OL P PLAINTEXT PRE TABLE TD TH TR UL XMP but default is "none" for BR FRAME nextID TBODY TFOOT THEAD but default is "list-item" for LI IE 6.x and above Example 1 This is a SPAN in a sentence.

      : Example 2 function getPets() { oRow1Cell2.style.display="none"; oRow2Cell2.style.display="block"; oRow3Cell2.style.display="none"; } :

      Horses

      Thoroughbreds

      Fast

      Dogs

      Greyhounds

      Fast

      Marsupia

      S 1 Reply Last reply
      0
      • N Nandan Basak

        DropDown onchange event table row will be visible/invisible is not working in IE8 but in chrome its working fine.the code in given below. plz help me...is there any wrong in this code?....Thanks in advance.......

        var $ = Object.prototype.$ = function(id){ return document.getElementById ? document.getElementById(id) : document.all ? document.all[id] : null };
        function showHideTableRow(tr, show){
        if(!tr){ return false; }
        try{
        tr.style.display = (show) ? '' : 'none';
        return true;
        }
        catch(e){
        tr.style.display = (show) ? '' : 'none';
        return true;
        }
        }
        function selAction(sel){
        for(var i=0; i

        D Offline
        D Offline
        Dholakiya Ankit
        wrote on last edited by
        #3

        use onclick instead of onchange it will not cause problem in any browser :)

        N 1 Reply Last reply
        0
        • D Dholakiya Ankit

          use onclick instead of onchange it will not cause problem in any browser :)

          N Offline
          N Offline
          Nandan Basak
          wrote on last edited by
          #4

          Thanks...It's working ......... :)

          Nandan

          1 Reply Last reply
          0
          • T twseitex

            styles of object table only IE are e.g. style.display display Sets or retrieves whether the object is rendered. style.visibility visibility Sets or retrieves whether the content of the object is displayed. visibility only IE visibility Attribute | visibility Syntax HTML { visibility : sVisibility } Scripting object.style.visibility [ = sVisibility ] sVisibility String "inherit" Default "visible" "hidden" Example 1 .vis1 { visibility:visible } .vis2 { visibility:hidden }

            Move the mouse over this text to make the sphere disappear.

            Example 2 function disappear() { oSphere.style.visibility="hidden"; } function reappear() { oSphere.style.visibility="visible"; } Move the mouse over this text to see the sphere disappear. display only IE display Attribute | display Syntax HTML { display : sDisplay } Scripting object.style.display [ = sDisplay ] sDisplay String "block" IE 5.x and above "none" "inline" "inline-block" "list-item" "table-header-group" "table-footer-group" default is "inline" but default is block for ADDRESS BLOCKQUOTE BODY CENTER COL COLGROUP DD DIR DIV DL DT FIELDSET FORM Hn HR IFRAME LEGEND LI unter IE 6.x LISTING MARQUEE MENU OL P PLAINTEXT PRE TABLE TD TH TR UL XMP but default is "none" for BR FRAME nextID TBODY TFOOT THEAD but default is "list-item" for LI IE 6.x and above Example 1 This is a SPAN in a sentence.

            : Example 2 function getPets() { oRow1Cell2.style.display="none"; oRow2Cell2.style.display="block"; oRow3Cell2.style.display="none"; } :

            Horses

            Thoroughbreds

            Fast

            Dogs

            Greyhounds

            Fast

            Marsupia

            S Offline
            S Offline
            Sunasara Imdadhusen
            wrote on last edited by
            #5

            please use <pre> tag for code formatting and more redablity

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups