Home     |     .Net Programming    |     cSharp Home    |     Sql Server Home    |     Javascript / Client Side Development     |     Ajax Programming

Ruby on Rails Development     |     Perl Programming     |     C Programming Language     |     C++ Programming     |     IT Jobs

Python Programming Language     |     Laptop Suggestions?    |     TCL Scripting     |     Fortran Programming     |     Scheme Programming Language


 
 
Cervo Technologies
The Right Source to Outsource

MS Dynamics CRM 3.0

Javascript / Client Side Development

File Upload - Change key code for ENTER key on Browse Button


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.

Can anyone plz help me.

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

On May 10, 7:01 pm, Erwin Moller

Thanks a lot. your solution worked well.
Add to del.icio.us | Digg this | Stumble it | Powered by Megasolutions Inc