Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>If I understand correctly your trying to set an attribute of an object that's in a different frame. Some browsers don't accept that.</p> <p>If I try to reproduce your problem I can see that in firefox I can toggle the frame's size (no problem).</p> <p>In chromium however, I get a security error because I'm trying to set a property on another page namely the frameset page from within a page inside a frame.</p> <p><em>edit:</em> The following code works in IE8. Is that what you need?</p> <blockquote> <p>Don't forget to add the jquery-1.8.2.min.js file</p> </blockquote> <p><strong>file: index.html</strong></p> <pre><code>&lt;!doctype html public "-//w3c//dtd html 4.01 frameset//en" "http://www.w3.org/tr/html4/frameset.dtd"&gt; &lt;html&gt; &lt;head&gt; &lt;title&gt;a simple frameset document&lt;/title&gt; &lt;/head&gt; &lt;frameset cols="32%,*" border="2" frameborder="1" framespacing="1"&gt; &lt;frameset rows="350,*" border="2" frameborder="1" framespacing="1" id="searchResultFrameset"&gt; &lt;!-- The minimize button are in this frame searchResultFrame --&gt; &lt;frame name="searchResultFrame" scrolling="no" src="frame1.html"&gt; &lt;frame name="itemFrame" frameborder="1" scrolling="no" id="itemFrame" src="dummy2"&gt;&lt;/frameset&gt; &lt;frame name="contentFrame" frameborder="0" scrolling="yes" id="contentFrame" src="dummy3"&gt; &lt;/frameset&gt; &lt;/html&gt; </code></pre> <p>file: frame1.html</p> <pre><code>&lt;html&gt; &lt;head&gt; &lt;script src="jquery-1.8.2.min.js"&gt;&lt;/script&gt; &lt;script&gt; $(init_page); function init_page() { // Minimize frame button $('#minimizeButton') .toggle(function () { parent.document.getElementsByTagName('frameset')[0].setAttribute('cols','22,*'); }, function () { parent.document.getElementsByTagName('frameset')[0].setAttribute('cols','32%,*'); }); } &lt;/script&gt; &lt;/head&gt; &lt;body&gt; &lt;button id='minimizeButton'&gt;toggle&lt;/button&gt; &lt;/body&gt; &lt;/html&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload