A decided to play some BF3 after a longer break from the game. But when I tried to join a server the battlelog plugin got stuck on "joining server". I tried restarting origin, restarting the browser, deleting browser history, using another browser, flushing DNS, restarting the computer, updating and repairing the game in origin, changing firewall settings, updating punkbuster, reinstalling punkbuster, making sure the browser plugin was active, nothing worked.
What did work was reinstalling the Battlelog Web plugin. But when I did a normal uninstall using CCleaner nothing changed. I read on the EA forums you have to uninstall everything including registry entries and other files that get left behind when doing a normal uninstall. So I used the Revo Uninstaller to uninstall the plugin and delete all the leftovers.
After that I first restarted the computer to finish the uninstallation and then did a clean install of the plugin and the game finally launched.
EDIT: It seems the solution mentioned above could have been a coincidence. I had the same problem today and it turns out my comodo firewall was blocking something. I added origin and bf3 to the allowed applications and now everything works again.
EDIT2: sometimes I get stuck on "joining server" when trying to change the server. I fixed this by closing battlelog and deleting the "PROF_SAVE_body" file in My Document [video].