Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Load from DB problem #11

Open
juju95 opened this issue Feb 5, 2014 · 1 comment
Open

Load from DB problem #11

juju95 opened this issue Feb 5, 2014 · 1 comment

Comments

@juju95
Copy link

juju95 commented Feb 5, 2014

When i try to load tags from DB i always get a "Wrong Object" of the returned list
And on the second one and next are shown

No error in the json returned, and if i random the tags order in the list, it is always the 1st row who return this error

And if i copy past my returned json in the defaultags, they are working perfectly
any idea

@antcptr
Copy link

antcptr commented Jun 24, 2016

This could happen when no 'jTagTag' classes are found. Could try calling the list action with some delay.
Like this:

` setTimeout(function(){
$.getJSON("ajax.php",{'action':'list'},function(tags){
$.each(tags, function(key,tag){
$("#img").addTag(tag.width,tag.height,tag.top,tag.left,tag.label,tag.id);
});
});

}, 1000);`

or
call list action after img load

$('#img').load(function(){ $.getJSON("ajax.php",{'action':'list'},function(tags){ $.each(tags, function(key,tag){ $("#img").addTag(tag.width,tag.height,tag.top,tag.left,tag.label,tag.id); }); }); });

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants