Recent requirements involve browser compatibility, and the first one to deal with is ie10.
The homepage uses frameset to embed two pages. The left side is the menu bar, which can be shrunk by changing the cols of the frameset. Other browsers work fine, but IE10 has no response.
function hide_show(){
if(window. parent.outer_frame.cols=="0,10,*"){
frameshow.src="<%=request.getContextPath()%>/common/images/left_handle.gif";
div_hide_show .title="Hide"
window.parent.outer_frame.cols = "210,10,*";
}else{
frameshow.src="<%=request.getContextPath()%> ;/common/images/right_handle.gif";
div_hide_show.title="Show"
window.parent.outer_frame.cols = "0,10,*";
}
}
Setting cols has no effect, but setting rows can. This is due to a BUG problem in IE10, and the page size needs to be adjusted to 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="Hide"
window.parent.outer_frame.cols = " 210,10,*";
}else{
frameshow.src="<%=request.getContextPath()%>/common/images/right_handle.gif";
div_hide_show.title= "Show"
window.parent.outer_frame.cols = "0,10,*";
}
/*force ie10 redraw*/
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);
}
}