check ALL the wiring in the door, sounds like you have a hot wire that's grounding from time to time (maybe you squished a wire or put a screw thru it while messing with the door panel) hence it working sometimes.... sounds like a short definately.... just gotta trace it down (that's the FUN part)