Link to home
Start Free TrialLog in
Avatar of macaulish
macaulish

asked on

HTML Form onChange Submit

Here is the code:

  <html>
  <head></head>
  <body>
    <form name="test_form" method="POST" enctype="multipart/form-data" action="uploadTester.asp">
      <input type="file" name="attach1" onChange="this.form.submit();" style="display: none;">
      <input type="button" onClick="attach1.click();" value="Select a File">
    </form>
  </body>
  </html>

The problem is the form is not submitting.  I'm getting an "Access is Denied." error.  If I change the style on the file input control so it will display, and click on that control directly, the form is submitted.  The problem with this is I don't want the users to see the text box associated with the file control so I developed this workaround.  I need to know why it won't submit this way though.

Thanks
ASKER CERTIFIED SOLUTION
Avatar of Roonaan
Roonaan
Flag of Netherlands image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of macaulish
macaulish

ASKER

Ronaan,

Thanks for your reply.  This is an intranet site with a limited amount of users in an asp database application.  The users do not need to see this control, they only need to pick a file to upload.

MacAulish
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial