homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / WebmasterWorld / New To Web Development
Forum Library, Charter, Moderators: brotherhood of lan & mack

New To Web Development Forum

Upload button not working in IE

 8:23 am on Dec 7, 2008 (gmt 0)

Well I'm pretty new to php so this might be a stupid question. I'm making a very simple upload form, it works fine in firefox, but in Internet Explorer there's some weird issue where the upload button won't press. You have to actually click in the text box and hit enter. I have no idea how to even attempt to fix it, if it were up to me I wouldn't bother at all with IE, but some misguided souls still use it and aren't gonna stop. Is there some extra code I'd need for IE? I tried googling it, but I find topics for other issues.



 8:47 am on Dec 7, 2008 (gmt 0)

If this is happening when loading the file on your local machine (as opposed to an online version) check that you have said YES to the message (that appears just under the address bar) that says:

"To help protect your security, Internet Explorer has restricted this file from showing active content that could access your computer.
Click here for options..."


 6:01 pm on Dec 7, 2008 (gmt 0)

Welcome aboard theturtlemoves!

some misguided souls still use it

Actually, most users use IE, I think FF is only approaching something like 20%. So yeah, it's a thorn all right, but shouldn't be a problem with this issue.

Verify a couple things:
1. Yes, this problem exists online, see previous post.
2. Your form has enctype="multipart/form-data"
3. The page it's on validates [validator.w3.org].

Then post some relevant code here, not the whole page, just the form. Be sure to remove site-specific references, see TOS [webmasterworld.com].


 1:07 am on Dec 8, 2008 (gmt 0)

Yeah I know but its actually growing. :D More people are moving towards firefox which makes me happy. It would also make me happy if IE just fixed all the bugs >_<

heres my form:

<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post" enctype="multipart/form-data">

<label for="file"> Select a file:</label> <input type="file" name="userfile" id="file">

Yeah it verifys and the "multipart/form-data" is there, and it is online, I tried it on both my computers and had a few friends try as well. I wanted to check if it was just my settings or not.

I don't think its IE's restrictions, I don't get any error messages and when I click into the text box and hit enter the file does upload.

Thanks for the welcome and the help guys :)


 9:28 pm on Dec 8, 2008 (gmt 0)

Are you using JavaScript to process that <button> element? You should likely be using an <input type="submit" form element instead.


 3:45 pm on Dec 9, 2008 (gmt 0)

when I click into the text box and hit enter the file does upload

coopster hit it, I think, your Javascript is broken or not present. Generally a button has no inherent function and requires client side scripting to work. Using a submit button insures it will work. When you press enter from any field except a textarea field, the default action is submit.

CWI Tech Guy

 5:24 am on Jan 7, 2009 (gmt 0)

I concur, that button likely is lacking a function so it does nothing.

Global Options:
 top home search open messages active posts  

Home / Forums Index / WebmasterWorld / New To Web Development
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved