Temporary solution: Use a bit of adesive tape to hold the connector in place.
Examine carefully the connector and the socket where it plugs into the laptop.
Is there any sign that there may indicate that there is some breakeage? Recently broken plastic present a smooth and shiny surface, frequently showing some arcked pattern. There is also a fair probability that there are some discoloured area near the damaged area.
Using a flashlight, look at the bottom of the socket. Is there any foreign thing lodged there, as dust or some debrits.
If any, try dislodging it with some CLEAN and DRY compressed air.
If there is some debrits that the compressed air can't dislodge, you may try to carefully remove them with a tootpick.
If the socket is degraded, or brocken, it may be necessary to replace it. It's normaly welded in place. It's also possible that there is also some screw or clips holding it in place.
Open the laptop so that you can access both sides of the motherboard.
Carefuly unweld the socket.
Un screw any screw if needed. Carefully unclip if it's clipped in place.
Get a replacement from any place that holds electronic parts.
Bring the original with you so you can compare and get an identical part.
Carefully weld the new socket in place. Use as little solder as possible. Be extra carefull that you don't bridge any contacts.
Reassemble the laptop.
Electro, April 2011