DropDown onchange event is not working in IE
-
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 -
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; istyles 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
-
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; iuse onclick instead of onchange it will not cause problem in any browser :)
-
use onclick instead of onchange it will not cause problem in any browser :)
Thanks...It's working ......... :)
Nandan
-
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
please use <pre> tag for code formatting and more redablity