title: problem with images load on setTimeout
body: <p>I have a problem, that i seems not be able find my way around it.</p>
  
  <p>The problem is, that I load images and some text trough ajax call, and then after some time i try to call ajax function again to get new set of images and text. However my problem is that images don't load in time (everything is fine with the text load) they kinda stop loading and then next call to ajax made.</p>
  
  <p>Is there a way around this problem ?</p>
  
  <p>I would really appreciate help from somebody.</p>
  
  <p><strong>EDIT:</strong> It seems that setTimeout("", 30000); working with different speed on firefox and IE. Is there a way to set it for a minute, i tried to put it 60000 but got same results in terms of how time passes until it calls to ajax...</p>
  
  <p>Here is my code:</p>
  
  <p>HTML</p>
  
  <pre><code> &lt;asp:Panel ID="portfolio" runat="server" style="border:solid 1px black; height:300px; width:400px; display:none;"&gt;
          &lt;div id="div_before"&gt;
              &lt;img id="img_before" alt="" height="200" width="100" /&gt;
              &lt;span id="txt_before"&gt;&lt;/span&gt;
          &lt;/div&gt;
          &lt;div id="div_after"&gt;
              &lt;img id="img_after" alt="" height="200" width="100" /&gt;
              &lt;span id="txt_after"&gt;&lt;/span&gt;
          &lt;/div&gt;
      &lt;/asp:Panel&gt; 
  </code></pre>
  
  <p>And my javascript:</p>
  
  <pre><code> function getPortfolio() {
              $.ajax({
                  type: "POST",
                  url: "Portfolio.aspx/GetImages",
                  data: "{}",
                  contentType: "application/json; charset=utf-8",
                  dataType: "json",
                  success: function(msg) {
                      onCallBack(msg);
                  }
              });
          }
  
  
          function onCallBack(msg) {
              var result = msg.d;
              if (result != null) {
                  var portfolio_div = $("div[id*='portfolio']");
  
                  $(portfolio_div).css({ 'display': 'block' });
  
                  var imgs = $(portfolio_div).find("img");
  
                  $("#img_before").attr({ src: "images/" + result.img_before.toString() });
                  $("#img_after").attr({ src: "images/" + result.img_after.toString() });
  
                  var txts = $(portfolio_div).find("span");
  
                  $(txts[0]).text(result.txt_before);
                  $(txts[1]).text(result.txt_after);
  
                  setTimeout("", 30000);
                  getPortfolio();
              }
              else {
                  $(portfolio_div).css({ 'display': 'none' });
              }
          }
  </code></pre>