jquery - Dynamic Javascript to allow character input after limited with preventDefault -
i have dynamic javascript rules engine in based on criteria such dropdown not changed, prevent characters being entered
$(document).on('keypress',"[id^="+condtionid+"]", function(event){ event.preventdefault(); });
however, if change dropdown value allow character, textbox refuses allow input.
examples of ids:
select: id="selectnumber435" input: id="condtionid435"
every row dynamically created table ends same random number created.
problem once not allow input, tried
return true; did not work
even condition in allow numeric, change dropdown value allows input , "holds on thinking should allow numeric.
i prefer not have make user delete dynamically created row, there has way allow typing characters input box again. sort of "reset" ...
you can dettach attached event:
$(document).off('keypress',"[id^="+condtionid+"]");
Comments
Post a Comment