light go out when i press the dimmer switch

You can get a dimmer switch with lifetime guaranty for $5.99 at O'reillys. I've had them suddenly crap out while driving at night over the years with many vehicles. It's best to just replace it as once they go faulty and ground out I've had one burn and melt the connector along with the wires. Still wasn't to bad to get a new dimmer switch, connector and replacement wire. O'reillys will register the warranty under your phone number and if it ever goes out they will replace it free. They also carry the indicator for the reverse lights as well. Can be bought in store or online and shipped to a store for free or your home for shipping cost. Here's the dimmer switch info to get you started.....

O'reillys Auto Parts
BWD - Headlight Dimmer Switch
Part # DS108
Line: BWD
-Limited Lifetime Warranty-
UPC: 33086010656
Price: $5.99
(Uses PT64 Connector $4.99 if needed)
Site: www.oreillyauto.com