Thread Modes How to Force an Iframe to Reload?

Get support on JavaScript,jQuery, AJAX and other related technology.
Post Reply
admin
Site Admin
Posts: 44

Thread Modes How to Force an Iframe to Reload?

Post by admin » Thu Aug 22, 2019 2:48 pm

Method 1:

Code: Select all

$('iframe').attr('src', $('iframe').attr('src'));
Method 2:

Code: Select all

document.getElementsByTagName('iframe')[0].src=document.getElementsByTagName('iframe')[0].src
Method 3:

Code: Select all

Object.prototype.each = function(f){
    var l = this.length;
    for(var i=0;i<l;i++)
        {
            try {
                this[i].eachCall = f;
                this[i].eachCall(this[i]);
            } catch(e){ throw e; }
        }
};

document.getElementsByTagName('iframe').each(function(){this.src=this.src;});

Post Reply