I know that this plugin is not from jQuery UI plugins, but it uses jQuery as kernel.
The problem I've got with this plugin is that I want to catch the ajax response to analyze it on the loaded handler (loaded.rs.jquery.bootgrid). Does anybody know how to make this? There's a method called responseHandler, but is never executed.
I don't know if this is a pure question of jquery or is a navite javascript language skill, but I'd like to implement a class in javascript with events that works as follows:
function myClass() {
//Private properties
var priv1;
var priv2;
...
//A public method that performs an ajax call:
this.asycnCall = function() {
$.ajax(.....
).done(function(res) {
// This makes something that ensures that the data will be ready to call outer this class
});
}
//An event handler
this.onDataReadyAfterAsyncCall = function() {
.... //The res returnet in asyncCall is ready here
}
}
Then, the main idea is to create an object to can access to the res variable as a method:
var obj = new myClass();
obj.asyncCall();
obj.onDataReadyAfterAsyncCall = function(res) {
// The res returned in asyncCall is accessible here!
The question is: I'd loke to get the data json string that I've
sent to the ajax request but in the done or the fail callbacks. Is this
possible? Or I must to declare it outside the ajax function?
Many thanks!
Hi,
please, take a look to the next code: http://jsfiddle.net/mp3man/sn0gdsfa/1/
The problem with this code, is that when you click over the
"green_layer", the "red_layer" click is catched too,
and this is what to avoid. There's any way to do it, without
changing the html context?
Many thanks,
Hello,
I have an issue with the Accordion jqueryUI widget. I'm appling
several times over the same html element the accordion with different
data loaded from Ajax data. The problem is that it only works the first
time (when page loads).
I need to apply the destroy() method to the accordion before reload it
again to solve this, but the problem is that I before apply this method,
$('#my-layer-id').accordion('destroy');
the accordion must be initialized, but the first time is not
initialized.
There's any way to get the first state of the accordion? I mean one
manner to do the next:
Hello,
I have a problem with a jquery UI accordion. The first time the page is
displayed, it appears something like this, that is a tree that contains
other subtrees recursively. This is ok:
This tree is created by calling a JS function called fillTree().
The problem appears when I call again fillTree() without refresh whole
page, the first nodes in tree appears at top-level without the rest of
the subtrees not associated with them:
In both cases, the tree representation should be the same everytime I
call filltree(), but I don't know what could happens with that
difference...
NOTE: I clear the main container of the main <div> that contains
the tree every time fillTree() enters with a .empty() jQuery function.
Do you know what could be the problem? I know that there must be
something related with internal jquery variables that must be reseted,
but I don't know which of them are. Can anyone help me?
But the ajax call is never done, due tries to connecto to
http://<AN IP>/admin/ws/inserNewNode. Excepts localhost as shown
in the code. Why jQuery or JS tries to solve the url before send the
calling? Then the calling is never done due it fails de CORS
(crossDomain, and I don't want to enable it). How can to correct
this if I want still use for navigate my url as http://localhost? I
have no entries in hosts windows files, so that's not the problem.