By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
463,189 Members | 596 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 463,189 IT Pros & Developers. It's quick & easy.

Browse button

P: 11
Hi all

I have been having problems regarding styling input areas, submit buttons etc.
I followed some people's advice in other forums and I managed to get it going.

Now, everything is working EXCEPT 1 : The "browse-for-a-file" button

I thought that this button, since it is coded as <input type="file" ...> would be treated like the other input elements ,such as the buttons.
BUT THIS IS NOT HAPPENING!!!!!

Even if I change, for instance, font-size = 500px, the "Browse" button and the fonts inside the input area remain the same as without styling at all...

What am I missing here?
Sorry for asking so silly staff :(
Oct 7 '05 #1
Share this Question
Share on Google+
6 Replies

Expert Mod 100+
P: 2,330
Hmm this worked for me, both in IE6.0 and Firefox. It might not work in older browsers. You can paste the code into a test.html file and open it in your browser.

Expand|Select|Wrap|Line Numbers
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  5. <title>Untitled Document</title>
  6. <style type="text/css">
  7. <!--
  8. input {
  9.  font-family: Geneva, Arial, Helvetica, sans-serif;
  10.  font-size: 18px;
  11.  font-weight: bold;
  12.  background-color: #CCCCCC;
  13. }
  14. -->
  15. </style>
  16. </head>
  17. <body>
  18. <form action="" method="post" enctype="multipart/form-data" name="form1" id="form1">
  19.   <input type="file" name="file" />
  20. </form>
  21. </body>
  22. </html>
  23.  
  24.  
Nov 18 '05 #2

P: 1
hi everyone!
i also have a problem with browse button. when i post a file with firefox, it cut all the path and remain only the file name (and i want the full file path). The problem dont happen with IE.
So what can i do when i want to get a full file path with firefox?
Mar 5 '06 #3

P: 10
hi everyone!
i also have a problem with browse button. when i post a file with firefox, it cut all the path and remain only the file name (and i want the full file path). The problem dont happen with IE.
So what can i do when i want to get a full file path with firefox?
A file field or "browse button" is to upload a file to a server, it is not ment to post a path only, you should use other methods (server variables) to get the path.
Mar 5 '06 #4

Banfa
Expert Mod 5K+
P: 8,984
hi everyone!
i also have a problem with browse button. when i post a file with firefox, it cut all the path and remain only the file name (and i want the full file path). The problem dont happen with IE.
So what can i do when i want to get a full file path with firefox?
I am guessing that you are looking at the wrong part of the received data, however you have not said what environment (PHP, Perl or some other CGI) is receiving this file.

Certainly in the PHP environment what you receive is the original name of the file (minus path) and the full path to the temporary file that contains the uploaded file so that you can then copy it to the location that you require.

It is not clear why a server would need to know the location of a file on a users PC and in fact could consitute a security risk, all the server needs is the name of the file which I guess is why you are receiving the behaviour you you are.

Your file receiving code would be a handy thing to see to help you futher.
Mar 6 '06 #5

P: 1
mrx
I am guessing that you are looking at the wrong part of the received data, however you have not said what environment (PHP, Perl or some other CGI) is receiving this file.

Certainly in the PHP environment what you receive is the original name of the file (minus path) and the full path to the temporary file that contains the uploaded file so that you can then copy it to the location that you require.

It is not clear why a server would need to know the location of a file on a users PC and in fact could consitute a security risk, all the server needs is the name of the file which I guess is why you are receiving the behaviour you you are.

Your file receiving code would be a handy thing to see to help you futher.
Hi
I have the same problem which I donīt think havent anything to do with the server. Itīs when the user will pick a file from the local PC to be sent to a server, the path dissapears and the application that should take care of it wont find the file. Thatīs because FF only give the filename without the path. IE works fine.

henrik
Aug 28 '06 #6

Banfa
Expert Mod 5K+
P: 8,984
You are going to have to be much more specific because on my FireFox the path is filled in fine. In fact if what you say is true then FireFox would not have the folowing it does as people rarely support broken software.

Give a detailed description of what happens, what actions you take as a user and where the problem occurs.
Aug 28 '06 #7

Post your reply

Sign in to post your reply or Sign up for a free account.