potresti provare con onchange al posto che onkeyup, ma non so se funzionerà...dovresti provare