This might sound rather simplistic, but I had the same type probem with my laptop a few weeks ago.
I found that the cord going from the power adapter to the laptop had something wrong with it. Evidently there is a (and I'm not real technical) short or bad connection in that cord. When I turn the power adapter different angles, by sitting it (the power adapter) on its side, it makes connection and the battery charges and the notebook works.
I am able to see when it is working and when it is not, by ther little light right by the power plug on the laptop.
You might have already thought of this, but really, this did happen to me a couple of weeks ago.