jbogdani
unread,Aug 6, 2010, 8:31:39 AM8/6/10Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Qutensil
Hi,
I've made few changes to q.window.js to have the possibility to load
content dynamically in the window using Prototype Ajax.Updater.
The content is loaded from a URL that is added as q.window options
(just like the text option).
The changes are:
1)
about line 199:
if (this.options.source && (source = $(this.options.source))) {
this.update(source.innerHTML);
source.remove();
} else if(this.options.url){ //<-- added
this.ajaxUpdate(this.options.url); //<-- added
} else {
this.update(this.options.text);
}
2) new method:
//update the window content with data from Ajax.Updater (url
needed!)
ajaxUpdate: function(url){
var content=this.holder.content
.update(new Element("div")
.setStyle({ height: "10px" }));
new Ajax.Updater(content, url, {evalScripts:'true',
insertion:Insertion.Bottom});
return this;
},
I think it could be implemented in q.window core in future versions.
It's useful to have the possibility to load content async.
Could be implemented to show a waiting gif in onLoading.