use sync method, but chrome and IE not work.