View Full Version : UpdateManager wait icon
techno_adi
6 Nov 2006, 5:54 AM
Hi,
There's some thing unusual happening when i use updatemanager..
I have two divs in my page and load some content dynamically from a server call
every thing works fine except that one div shows "loading" with icon at place and other just shows "loading" with no icon at place..
why is this happening?
jack.slocum
6 Nov 2006, 6:01 AM
I don't know. Do you use the standard .loading-indicator selector? If yes, do you have it in an element with any rules that would override the CSS for the indicator?
techno_adi
6 Nov 2006, 6:06 AM
here is the whole code
<head>
<title>Loading Indicaator Example</title>
<style>
.loading-indicator {
font-size:8pt;
background-image: url('images/wait.gif');
background-repeat: no-repeat;
background-position: left;
padding-left:20px;
}
#example {
border-right: black 1px solid;
border-top: black 1px solid;
border-left: black 1px solid;
border-bottom: black 1px solid;
background-color: #ffccff;
height:500px;
width:24%;
padding:5px;
float:left;
clear:right;
}
#example1 {
border-right: black 1px solid;
border-top: black 1px solid;
border-left: black 1px solid;
border-bottom: black 1px solid;
height:500px;
width:74%;
padding:5px;
float:right;
clear:left;
}
</style>
<script></script> //yahoo's all utilities
<script></script>
<script></script>
<script></script>
<script></script>
<script></script>
<script></script> //yui-ext-core.js
<script>
var ajaxExample = {
ajaxInit : function(){
var mgr = new YAHOO.ext.UpdateManager('example');//pass the element id here
mgr.update('LoadingHandler.ashx');//server script to call
mgr.onUpdate.subscribe(this.onCallSuccess);//callback for success
mgr.onFailure.subscribe(this.onCallFailure);//callback for failure
var mgr1 = new YAHOO.ext.UpdateManager('example1',true);
mgr1.update('LoadHandler.ashx');
mgr1.onUpdate.subscribe(this.onSuccess);
mgr1.onFailure.subscribe(this.onFailure);
},
onCallSuccess : function(oElement,oResponse){
example.innerHTML = oResponse.responseText;
},
onCallFailure: function(oElement,oResponse){
alert("failure - example div");
},
onSuccess : function(oElement,oResponse){
example1.innerHTML = oResponse.responseText;
},
onFailure: function(oElement,oResponse){
alert("failure - example1 div");
}
};
//could have registered using simple js window events here
YAHOO.ext.EventManager.onDocumentReady(ajaxExample.ajaxInit, ajaxExample, true);
</script>
</head>
<body>
<form>
<div> </div>
<div> </div>
</form>
</body>
</html>
jack.slocum
6 Nov 2006, 6:18 AM
I don't know. There's not much that can go wrong there. I don't know what to suggest.
You can lose the onUpdate handlers, it will do that for you.
You will want to subscribe to onFailure before you call update in case it returns immediately.
techno_adi
6 Nov 2006, 6:33 AM
i did all that, the error still remains..
does this error happen at your end with the same example?
Powered by vBulletin® Version 4.1.5 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.