<since_humans_read_this_I_am_spammed_too_m
@spamyourself.com> wrote:
> bsm wrote:
> > Hi,
> > I have File Upload control in my form. When I click Enter key, it
> > triggers "Submit" button event. So I wrote onkeydown function as
> > follows:
> > if (window.event.keycode == 13)
> > {
> > return false;
> > }.
> > hence "Submit" button didn't fire.
> > But I want to assign Spacebar keycode as follows (so that it will open
> > file upload window)
> > if (window.event.keycode == 13) window.event.keycode=32. But this is
> > not working.
> What about:
> if (window.event.keycode == 32){
> // code to fire up your file-upload-thingy.
> }
> And if you want people using a real internetbrowser to use your app, I
> suggest you change your code so it catches those events too.
> window.event is IE only...
> Regards,
> Erwin Moller
> > Can anyone plz help me.- Hide quoted text -
> - Hide quoted text -
>
Thanks a lot. your solution worked well.