reload ajax boxy

78 views
Skip to first unread message

imami

unread,
May 16, 2009, 3:26:39 PM5/16/09
to boxy
is there any way to reload a Boxy which was loaded before
using simple ajax "Boxy.load"


I need something like :
Boxy.get(e).reload();
so I will be able to assin it ro a button or ... in order to reload
the content of a boxy contains elemet "e"

any Idea ? any way ?
thx

Göksel TÜR

unread,
May 17, 2009, 8:53:49 AM5/17/09
to boxy
dragging: null,
LoadedBoxy: null, // Create new Handle ..
// load a URL and display in boxy
// url - url to load
// options keys (any not listed below are passed to boxy
constructor)
// type: HTTP method, default: GET
// cache: cache retrieved content? default: false
// filter: jQuery selector used to filter remote content
load: function(url, options) { ......


After replace load function this

load: function(url, options) {

options = options || {};
var _parent = this;
var ajax = {
url: url, type: 'GET', dataType: 'html', cache: false,
success: function(html) {
html = jQuery(html);
if (options.filter) html = jQuery(options.filter,
html);
if (_parent.LoadedBoxy){
_parent.LoadedBoxy.setContent(html);
_parent.LoadedBoxy.show();
}else{
_parent.LoadedBoxy = new Boxy(html, options);
}
}
};
....



Message has been deleted

imami

unread,
May 20, 2009, 7:04:37 PM5/20/09
to boxy
Thanks
This code is used to open all ajax contents in one Boxy ....

But what I need is a method (function) that when I call it,
reload a Boxy

for example :
/*---------------------------------*/
do_reload : function(ele){
/// codes to reload a Boxy that contains "ele"
/// ?????
}
/*---------------------------------*/


Enrique Barchiesi

unread,
Dec 5, 2012, 2:11:34 PM12/5/12
to boxy-...@googlegroups.com
The only way i found is

function reload_modal( url ){
    options = { title:'Dialog', modal: true ,closeable: true };
    if(check_modal_open()){
        $.ajax( url ,{ success: function(data){
                 ModalWindow.setContent( data );
                ModalWindow.center();
         }
          });
    }else{
         
         new Boxy("<div id='modalWindow'></div>", options );
         ModalWindow = Boxy.get($('#modalWindow'));
         ModalWindow.setContent( "asdfasdfasdf asdfa sdfa sdf asdfasdfasdf")
         $.ajax( url ,{ success: function(data){
                 ModalWindow.setContent( data );
                ModalWindow.center();
         }
         });
    }
}
Reply all
Reply to author
Forward
0 new messages