Cols attribute of IE10 compatibility of frameset

  • 2020-03-30 01:14:03
  • OfStack

The most recent requirement concerns browser compatibility, starting with ie10.

The main page is embedded with frameset. The left side is the menu bar, which can be shrunk by changing the cols of frameset. Other browsers were fine, but IE10 didn't respond.


function hide_show(){
if(window.parent.outer_frame.cols=="0,10,*"){
frameshow.src="<%=request.getContextPath()%>/common/images/left_handle.gif";
div_hide_show.title=" hidden "
window.parent.outer_frame.cols = "210,10,*";
}else{
frameshow.src="<%=request.getContextPath()%>/common/images/right_handle.gif";
div_hide_show.title=" According to "
window.parent.outer_frame.cols = "0,10,*";
}
}

Setting cols has no effect, setting rows can, this is due to the BUG problem of IE10, need to adjust the page size will take effect:

function hide_show(){
if(window.parent.outer_frame.cols=="0,10,*"){
frameshow.src="<%=request.getContextPath()%>/common/images/left_handle.gif";
div_hide_show.title=" hidden "
window.parent.outer_frame.cols = "210,10,*";
}else{
frameshow.src="<%=request.getContextPath()%>/common/images/right_handle.gif";
div_hide_show.title=" According to "
window.parent.outer_frame.cols = "0,10,*";
}

if(navigator.userAgent.indexOf('MSIE 10.0') != -1){
var w = parent.document.body.clientWidth;
parent.document.body.style.width = w + 1 + 'px';
setTimeout(function(){
parent.document.body.style.width = w - 1 + 'px';
parent.document.body.style.width = 'auto';
}, 0);
}
}


Related articles: