I need to implement the following in my App page:
pre
$("#StreamUrl").keydown(function (e) {
if (e.keyCode == 32) {
$(this).val($(this).val() + "-"); // append '-' to input
return false; // return false to prevent space from being added
}
}).change(function (e) {
$(this).val(function (i, v) { return v.replace(/ /g, "-"); });
});
/pre
Basically I want to prevent the user form keying in space character.
I found that it can be down on keydown event. The above script taken from here (http://stackoverflow.com/questions/38...) is plain jQuery. In Appery, I have the keydown event, but I do not know how to pass 'e' parameter to it.
Please advise.