After reading the archives I figured it might be the wires in the door. I did a quick inspection of both doors and it didn't look like I had any broken wires.
I had a similiar problem on my ZJ with my passenger door's lock/window working when it wanted to. I checked the rubber boot between the door and the body where all the wires were and every thing looked fine so I took the door panal off and found that the connector that connects to the switch was loose. I popped it back into place and secured it with electrical tape and it works fine now.
Hope that helps!