Hello,
i am using ajax from prototype and some effects with scriptaculous and
i am getting a strange behaviour when it is to be executed in Internet
Explorer, my code use prototype history manager and for some reason my
contents isn't show in IE, the core of the javascript is listed below:
var site = null;
var Chiquinho = Class.create();
Chiquinho.prototype = {
initialize : function(links) {
this.justloaded = true;
this.currentLink = undefined;
this.links = links;
this.contentEl = $('ajax-content');
this.site_urls = {
home : '/',
empresa : '/empresa',
artista : '/artista',
agenda : '/agenda',
locacao : '/locacao',
contrate : '/contrate',
depoimento : '/depoimento',
parceiro : '/parceiro',
contato : '/contato',
artista1 : '/artista/show/id/1',
artista2 : '/artista/show/id/2',
artista3 : '/artista/show/id/3',
artista4 : '/artista/show/id/4',
artista5 : '/artista/show/id/5',
artista6 : '/artista/show/id/6',
artista7 : '/artista/show/id/7',
artista8 : '/artista/show/id/8',
artista9 : '/artista/show/id/9',
artista10 : '/artista/show/id/10',
artista11 : '/artista/show/id/11',
artista12 : '/artista/show/id/12',
artista13 : '/artista/show/id/13',
artista14 : '/artista/show/id/14',
artista15 : '/artista/show/id/15',
artista16 : '/artista/show/id/16',
artista17 : '/artista/show/id/17',
artista18 : '/artista/show/id/18',
artista19 : '/artista/show/id/19'
};
this.protoHistoryManager = new ProtoHistoryManager();
this.reqHistory = this.protoHistoryManager.register('pages',
[ this.links[0] ], // default, page 0
function(values) {
var index =
this.links.indexOf(values[0]);
if (index == 0 && this.justloaded) {
return;
}
if (index != -1) {
this.justloaded = false;
this.linkClick(this.site_urls[values[0]], values[0]);
}
}.bind(this));
this.protoHistoryManager.start();
},
linkClick : function(url, linkid) {
this.currentLink = {
url : url,
linkid : linkid
};
this.cleanContent();
this.reqHistory.setValue(0, linkid);
},
cleanContent : function() {
new Effect.Appear(this.contentEl, {
from : 1.0,
to : 0.0,
duration : 1.0,
afterFinish : this.getPage.bind(this)
});
},
getPage : function() {
if (this.currentLink != undefined) {
var url = this.currentLink.url;
new Ajax.Updater('ajax-content', url, {
onSuccess : function() {
new Effect.Appear(this.contentEl, {
from : 0.0,
to : 1.0,
duration : 1.0
});
}.bind(this)
});
}
}
};
Event.onDOMReady(function() {
site = new Chiquinho( [
'home', 'empresa', 'artista', 'agenda',
'locacao',
'contrate', 'depoimento', 'parceiro',
'contato',
'artista1', 'artista2', 'artista3',
'artista4',
'artista5', 'artista6', 'artista7',
'artista8',
'artista9', 'artista10', 'artista11',
'artista12',
'artista13', 'artista14', 'artista15',
'artista16',
'artista17', 'artista18', 'artista19'
] );
});
the getPage seen to not show contents returned from ajax in all
versions of IE (from 6 to 8) how to overcome this and show my content
as it is done with Firefox and Chrome ?
PS.: if anyone wants to see the real test (from the site) access
http://teste.chiquinholins.com.br
Thanks a lot.
--
You received this message because you are subscribed to the Google Groups
"Prototype & script.aculo.us" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/prototype-scriptaculous?hl=en.