rauchg / TextboxList

MooTools tokenizer
100 stars 35 forks source link

spinner.gif not working for me... or "please wait..." or "loading..." #4

Open cyngus opened 13 years ago

cyngus commented 13 years ago

need some type of notification that the search is in progress so users dont think something went wrong .. my db is very large and the query takes a few seconds to populate anything in the autocomplete pulldown.. i noticed that there is a spinner graphic in the images folder but i can't for the life of me figure out how or why i can't get it to work. any help please?

thanks!

czukowski commented 13 years ago

There is a placeholder text, that's displayed during load, but you need to pass a message string upon creating TextBoxList instance. for example:

        plugins: {
            autocomplete: {
                remote: {
                    loadPlaceholder: 'Please wait...',
                },
            }
        }

I'm not sure what happens if you don't do this, I'd expect some default text to appear, but might also be that it doesn't appear at all.

As for spinner graphics, in demo, there's a style element, where it's being applied to .textboxlist-loading selector, see around line 71.

cyngus commented 13 years ago

regarding the spinner graphic.. i see where its being called in both the css and js on the demo however.. it doesn't ... work ... on the demo =) which is whats making troubleshooting this a bit more difficult.

none of the autocomplete demos show the spinner working

czukowski commented 13 years ago

ok, it looks like the selector for placeholder is .textboxlist-autocomplete-placeholder, and it's not set in demo CSS. But it goes the same for both 'Type to receive suggestions' and 'Loading...' placehodlers, so you may want to add and remove class textboxlist-loading to it with javascript, when appropriate.

cyngus commented 13 years ago

Thank you for your help! i'm sorry it took so long to get back to you, your help was ... helpful =) we've got everything working now..

however have you noticed that this mootools texboxlist autocomplete does not work in IE9? Been trying to figure out what could be wrong.. any ideas?

czukowski commented 13 years ago

Do you mean it doesn't work at all? I've just tried that in IE9 and it shows up.

I don't have spinner graphics though, but I haven't made that to appear anyway.

czukowski commented 13 years ago

There's an error in demo, but it looks like IE9 doesn't want to allow XHR calls, probably, when viewed locally. Try placing it on to some staging server to see if it works.

This line from mootools-core has thrown "Access denied" for me:

xhr.open(method.toUpperCase(), url, this.options.async, this.options.user, this.options.password);
cyngus commented 13 years ago

Well we've got it running on our site curently and it works just fine until it is viewed in IE9 i thought that maybe it was that mootools was fairly outdated in the packaged autocomplete script so we updated to the newest mootools 1.3.1 and that had no effect on the script on our server however it did make the all the areas of the demo work on http://devthought.com/wp-content/projects/mootools/textboxlist/Demo/ page.. EXCEPT the text field "values seeded on demand" and thats the exact one that we need... figures