That is your door latch microswitch (although possibly the door handle switches as well). Basically, when you open the door, there is a switch on each handle (interior and exterior). This tells the window to roll down a smidge. It stays down until the microswitch in the door latch tells it the door is closed. This allows your door to close without the window smashing the frame.
What has happened is one of the microswitches is worn, and it is bouncing "open"/closed, causing this.
Do you have a floppy door handle? If you open the door, and leave it open does the window stay down?
I'd be inclined to suspect door latch - they are a common failure point.
|