onResize stuck in infinite loop on iPad
<p>Im kind of new to javascript so please excuse me if this in a stupid question.</p>

<p>I have a website which shows a couple of graphs. The problem is that these graphs are drawn when the page is loaded which means that they keep their original size even if the width/height of the screen is changed. This has not been a problem on the desktop version but now I want to make it work on my iPhone and iPad aswell. This means that the graphs needs to be reloaded when I swap from portrait to landscape, and the other way around. </p>

<p>I have tried to solve this by adding a "onResize" to the body-tag. This works perfect when I resize my browser window in desktop mode and it also works fine on my iPhone. BUT the iPad gets caught in an infinite loop! WHY?</p>

<p>Please help me with this problem, I have spent faar to may hours on it now...</p>

<p>Here's the code I use:</p>

<p>In Header:</p>

<pre><code>&lt;script type="text/javascript"&gt;
function myfunction(){window.location.href = window.location.href;}
&lt;/script&gt;    
</code></pre>

<p>And in body:</p>

<pre><code>&lt;body onresize="myfunction()"&gt;
</code></pre>
