I've followed all of the trouble shooting tips for the battery being plugged in, but not charging. As soon as I take the power cord out of the computer, it shuts off.
If that doesn't work, try an aftermarket battery. Or, before that, I suppose you could go to Staples or Office Depot and see if their universal charger will actually charge the battery that's in there.
Don't recommend purchasing a universal charger. Thought the same thing and purchase one and it lasted for about four months then it quit working and charging my battery. Tech rep at Staples informed me that universal chargers are only a temp fix to get you by until you get a factory adapter replacement.