KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I have a frameset where in one frame have a button that minimize its parent frameset to a certain size. The code works but the problem is if I choose to resize frame with my mouse manually first and then press the minimize button it will resize incorrectly in IE8 and Chrome. It resize correctly in FF. I have this HTML structure ... <frameset cols="32%,*" border="2" frameborder="1" framespacing="1"> <frameset rows="350,*" border="2" frameborder="1" framespacing="1" id="searchResultFrameset"> <!-- The minimize button are in this frame searchResultFrame --> <frame name="searchResultFrame" scrolling="no" src="dummy"> <frame name="itemFrame" frameborder="1" scrolling="no" id="itemFrame" src="dummy2"></frameset> <frame name="contentFrame" frameborder="0" scrolling="yes" id="contentFrame" src="dummy3"> </frameset> ... and this code that executes when pressing on the button. // Minimize frame button $('.minimizeFrame').toggle(function () { parent.document.getElementsByTagName('frameset')[1].setAttribute('cols','22,*'); }, function () { parent.document.getElementsByTagName('frameset')[1].setAttribute('cols','32%,*'); }); I can see that cols="32%,*" changes to cols="22,*" in the developer tools, but still it render in wrong size. Why do it resize incorrectly after changes by the mouse? Am I missing something or is it a bug in browser? Or are there maybe an alternative solution to resize the frame without this bug? Example http://jsbin.com/ohihiy/2
Tags (comma-separated)
Save Edits
Cancel