Installing detergent lid spring
I had the same problem, had to replace a defective spring. The trick is putting it all back together with the spring in the right place. I ended up going to Sears to see how it looked in a new machine (luckily they still had ONE model with the same detergent dispenser!).
If you're not sure which way the spring goes, remember that the spring should compress (coil) when the detergent door is closed, and uncoil when it snaps open.
What I finally figured out to reassemble, that worked:
1) Put the spring and pin on the detergent door, with the spring coiled so the top side of the coils point back (toward the detergent cup)
2) Snap the pin back into its slots, with the spring's square center tab toward the matching base in the dishwasher door
3) GENTLY lift one side of the pin up again, so you have room to use a small screwdriver to push the free end of the spring into the detergent lid, then press the pin back in
4) Repeat (3) with the other side of the pin, and the other end of the spring.
(Sorry if this isn't clear without pictures, I don't have any.)