1. #1
    Sencha User
    Join Date
    Aug 2012
    Vote Rating
    sidthegooner is on a distinguished road


    Default Managed Iframe Firefox issue when content gets reloaded -- Urgenttttt

    I have a default src pointing out to a jsp...

    On the afterrender of the iframe panel, i have an array of image url's which i load on Timer tasks..Now the problem is domready fires every time the image has been refreshed in google chrome,but if there are
    totally three items in the array,it is decrementally missing out to fire the domready event for one of the items in the array...Eg : On first time load domready does not fire for the second item of the array,second time dies not fire for the first item and so on...Could be a silly issue..Any help is greatly appreciated...

    Thanks in advance
    	var updateSrc = function(){
    		var img = streamedImgs[count];
    		var iframe = that.setSrc(img,false);
    		count = (count+1 == streamedImgs.length)?0:count+1;
    	var task = {
    	    run: updateSrc,
    	    interval: 5000 //10 seconds
    	var runner = new Ext.util.TaskRunner();
    Last edited by sidthegooner; 25 Sep 2013 at 8:59 AM. Reason: Indentation

  2. #2
    Sencha - Services Team hendricd's Avatar
    Join Date
    Aug 2007
    Long Island, NY USA
    Vote Rating
    hendricd will become famous soon enough hendricd will become famous soon enough



    For the style of image rotation you are attempting (in-essence, a timer) you must account for the asynchronous nature of image 'loading'. A fixed 5/10 second timer will be hit-or-miss as you have no idea what the download size of the image IS or how long it will take any of the browsers to render it (depending on encoding).

    Better, would be to rely on the 'load' event of the MIF (which is only fired when all image assets, scripts, etc are fully loaded and initialized). Only then should you '.setSrc' for the next one.

    hope that helps
    "be dom-ready..."
    Doug Hendricks

    Maintaining ux: ManagedIFrame, MIF2 (FAQ, Wiki), ux.Media/Flash, AudioEvents, ux.Chart[Fusion,OFC,amChart], ext-basex.js/$JIT, Documentation Site.

    Got Sencha licensing questions? Find out more here.

Thread Participants: 1

Tags for this Thread