开发者

async validation not working any more

开发者 https://www.devze.com 2023-04-13 08:55 出处:网络
I\'m running fb registration for a long time now. Today however I found that async validation stopped to work!

I'm running fb registration for a long time now. Today however I found that async validation stopped to work!

It seems to be a FB bug as the example script on the following page seems to not work as well and symptoms are identical: http://developers.facebook.com/docs/plugins/registration/advanced/

I've checked that under Chrome and Firefox. Under Firebug and debugger I can see that the onvalidate() function is beeing called repeatedly. No matter how it the cb() is beeing called no message is displayed (I checked both cases: error and clear).

My async validation function is exactly as in the example:

function fb_validate_async(form, cb) {

    $.getJSON('{$base_href}json_user.php?name='+ form开发者_开发问答.login,
        function(response) {
            if (response.error) {
                // Username isn't taken, let the form submit
                cb();
                //return;  <- I even tried this but no luck
            }
            cb({ login: 'Ten login jest zajęty'});
    });
}

Of course I do have on my page:

<div id="fb-root"></div>
<script type="text/javascript" src="http://connect.facebook.net/pl_PL/all.js#appId=XXX&xfbml=1"> </script>

and the sript worked before.

Any clues?

0

精彩评论

暂无评论...
验证码 换一张
取 消