Want to prevent opening of 2 popups upon shift+insert (javascript) -
I have a function that opens popup after typing in 6 characters in the input field. It works fine, except when you ctrl + insert, shift + insert and paste it. In that case there are 2 popups (similar) - I agree to make a change and one. It just looks ugly and can be confused. Is there a way to limit the number of popups? How were the characters entered in the input sector?
& lt; Script type = 'text / javascript' & gt; Var Pop; Function OpenPop (border field, border number) {if (limitField.value.length == limited number) {if (pop) {pop.close (); } Pop = window.open ('somefile.php? County = county & amp; pin =' + borderfield.value '' & amp; field = '+ borderfield.id,' popupwin ',' menu = no, not history = ' , Resizable = yes, scrollbar = yes, toolbar = no, width = 750, height = 300 '); Pop.focus (); }} & Lt; / Script & gt; & Lt; Input type = 'text' size = '6' maxlength = '6' id = 'amedsouch' name = 'asadusuch' onKeyUp = 'openopop (this.form.suchandsuch, 6);' Gt;
Comments
Post a Comment