My camera pentax optio wp wont turn on. though is

My camera pentax optio wp won't turn on. thought is was bad battery, not holding charge now i think the charger is bad cause i bought a new battery that doesn't work either. able to hook camera up to laptop to view pictures though. so i guess camera is not defective.

If possible, check the charger output or the charge status of the batteries with a voltmeter. That will narrow the field for you. If the charger and batteries seem OK, your problem may be due to corrosion on the battery contacts inside the camera which can prevent the full power of the batteries from flowing into the camera. Try this free fix before you do anything else: remove the batteries and wipe the camera contacts firmly with a dry cloth (heavy corrosion may require cleaning with a wire brush, steel wool, or sandpaper). Remove any residue that may have fallen into the battery compartment during cleaning, then wipe both ends of the batteries and place them back in the camera. This cleaning clears the problem about 90% of the time. If it doesn't work for you, your camera may have a problem that requires professional repair.