why won'y my windows go back up after going down a little upon opening the door? on 1999 Jaguar XK8

when opening either door on my 1999 jaguar convertible the window goes down a little but then will not go back up. what controls this action? is there an easy fix for this problem?
i can't secure the car because the window is always part way down. it will happen on either side. if i am inside i can put it up. if i am leaving the car, a window is always part way down? (about two inches).

Asked by for the 1999 Jaguar XK8
U have to reprogramme it. With the key on Hold and raise the window until u hear a "click" . Lower the window until I hear the same click. Hold the gas pedal down for a "5" count. window should reprogramme. Mine did!
1 more answer , 1 more comment
Did this start after replacing the battery or having it jump started? This is common on convertibles and usually indicates that a loss of power, caused the windows to lose their initialization. The most common procedure is with the key on, engine off, get inside and shut all doors. Use the switch to command the window all the way down and continue to hold the switch for 5 seconds. Then use the switch to run the window all the way up and continue to hold the switch for an additional 5 seconds. If this works, repeat procedure for the other side.
thank you, thank you. you made my day!!

i will forever be grateful to you.

best regards