Jump to content

Best way to tell flash to load again php when error loading data


nightkarnation

Recommended Posts

Please the important code here is just 1 line...the rest is working perfectly, check on the part where content_lv2.onLoad = succes...

If it doesnt...It displays error loading data... In my case, when webpage is online, it may happen from time to time...how can i remedy this to loop back and load again.

Calling back loadNews() is a good way??

Do u suggest a better idea?

 

loadNews();
function loadNews() {
content_lv2.load("login.php");
content_lv2.action = "readNews";
content_lv2.onLoad = function(succes) {
	if (succes) {
		for (var g = 0; g<this.cant; g++) {
			txtNews.text += content_lv2["date"+g]+": "+newline;
			txtNews.text += content_lv2["news"+g]+newline;
			txtNews.text += newline;
			txtNews.text += newline;
		}
	} else {
		txtNews.text = "Error loading data";
		loadNews();
	}
};
content_lv2.sendAndLoad("login.php", content_lv2, "POST");
}

 

Thanx in advance for your reply!

Cheers!

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.