PDA

View Full Version : Hide default loading.gif on load()



pr0
4 Apr 2008, 2:46 AM
Hi dudes,

my code:


Ext.get("news_list").load({
url: "search_news.php",
params: pars,
scripts: true,
nocache: true,
text: "<table width='300' border='0' align='center'><tr><td align='center'><img src='images/loading.gif'></td></tr><tr><td align='center'>Loading...</td></tr></table>"
});


when i insert my custom images/loading.gif it show perfect, but default loading.gif appears too getting 2 loading.gif on screen.

How can i hide default load() loading.gif?


Thx, regards!

Condor
4 Apr 2008, 4:39 AM
The is no way to prevent Ext.Updater.update() from surrounding your text with <div class="loading-indicator"></div>, but you could use CSS rules to remove the background image.

pr0
4 Apr 2008, 7:54 AM
i modified ext-all.css .loading-indicator style and now works good!

Thx you :)

DVSDevise
5 Apr 2008, 8:23 PM
I just added a display none rule to .loading-indicator as Condor suggested, thanks.



.loading-indicator {
display: none;
}

If there's a better way. Let me know.