Submit form on enter keypress

Discussion in 'Web Design and Development' started by nomade, Jul 4, 2008.

  1. nomade macrumors member


    Dec 2, 2006
    I have a form for intranet adminisration where the last field is to choose an image (source_file). I would like to allow the submission of the form:confused: on enter keypress.

    I've try a javascript event but it work only when the last input field is a text but it's not working when the last input is a source_file.

    Any suggestion ?:confused:
  2. bootedbear macrumors 6502


    Sep 13, 2004
    Austin, TX
    In most browsers, if the form contains a submit button, a press of Enter will submit the form.

Share This Page