Tuesday, February 2, 2016

How do I force a refresh of an iFrame in web forms?

Change instead a asp:HiddenField! You then need a jQuery middleman like so?

function listenForIFrameRefresh() {
   var listener = function() {
      var backingstorewrapper = $(".emailTrigger")[0];
      var backingstore = $(backingstorewrapper).children()[0];
      if ($(backingstore).val()) {
         document.getElementById("refreshme").src = "IFrameForLogo.aspx?" +
               $(backingstore).val() + "=" + (new Date());
         $(backingstore).val("");
      }
   }
   var interval = setInterval(listener, 100);
}

No comments:

Post a Comment