I used javascript a lot but I still prefer Flex and actionscript to it. Javascript is such a pain in the a***s
and for my programmer
ego is doesn't feed my appetite of knowledge
Actionscipt 3 is a proper OO language, very similar to
Java and I think it is perfect for RIA and enterprise applications.
However I'm not going into the comparison because you can find many of them on internet, I will just give my personal point of view based on my experience.
I believe that with Flex/Actionscript you can build Richest User Interface than with Javascript. In web applications I use even both together.
I continue evaluating and trying new technologies but until now I didn't find a real good competitor of Flex. Probably the only one is GWT but still not at the same level for Flex and probably just for UI. With Flex you can build also Games, WebTV and much more. The Flex frameworks are growing every day for 3d, physic, MVC
patterns, microarchitectures, etc..
There is also a framework that compile your application in c++ ready for the iphone.
Another option is JavaFX but it hasn't got the same penetration as the Flash Player.
Years ago I've worked with GWT and at the end we had to rebuild the application using Flex to satisfy our client.
I've worked also in some projects using SpringMVC integrated with some JavaScript/Ajax frameworks and even if the result was good the code was terrible to maintain.
I'm not a Flex fanatic but I love technologies and for my experience at the time of writing in term of RIA Flex/Actionscipt is the best one.
I won't never back to JavaScript and if Flash will ever die my choice will be GWT, JavaFX or back to Java Swing
Hope it helps!