473,884 Members | 2,415 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Browse button

11 New Member
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
6 16945
Niheel
2,456 Recognized Expert Moderator Top Contributor
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
mambai
1 New Member
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
Centaury
10 New Member
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
9,065 Recognized Expert Moderator Expert
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
mrx
1 New Member
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
9,065 Recognized Expert Moderator Expert
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

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

Similar topics

2
9932
by: Ron Brennan | last post by:
Good afternoon. The entire task that I'm trying to achieve is to allow a user to browse and upload multiple files simultaneously, hiding the Browse button of <input> tags of type="file" and replacing it with a button of my own background color and text. The file paths I'd like displayed in a textarea and then the files uploaded at once.
1
2296
by: Chris Lasher | last post by:
Hello, I'm trying to write a tool to scrape through some of the Ribosomal Database Project II's (http://rdp.cme.msu.edu/) pages, specifically, through the Hierarchy Browser. (http://rdp.cme.msu.edu/hierarchy/) The Hierarchy Browser is accessed first through a page with a form. There are four fields with several options to be chosen from (Strain, Source, Size, and Taxonomy) and then a submit button labeled "Browse". The HTML of the form is...
5
3681
by: Fred | last post by:
Hi I am searching for a module, that would allow me to call files by using a 'browse' button. Is there any uniform module for browsing files, or is there a special module for *.txt files? Thanks Fred
4
14023
by: Werner Kaiser | last post by:
Hi, I want to change the text for the file-browse button within a form: I have something like that: <FORM ENCTYPE="multipart/form-data" ACTION="<?php echo basename(__FILE__) ?>?command=CHANGECONTPICTURE" METHOD=POST> <INPUT_TYPE="File" name="userfile" size="1" maxlength="255">
5
5483
by: Ron Brennan | last post by:
Good afternoon. The entire task that I'm trying to achieve is to allow a user to browse and upload multiple files simultaneously, hiding the Browse button of <input> tags of type="file" and replacing it with a button of my own background color and text. The file paths I'd like displayed in a textarea and then the files uploaded at once.
3
31945
by: oopaevah | last post by:
I want to have a separate button which invokes the "browse" button on an input type=file. In internet explorer the following code works ok, in firefox nothing happens. All I do is call click() for the input control. Do you know how to make this work in firefox? Thanks
9
24757
by: Prakash Singh Bhakuni | last post by:
am replacing the default "Browse..." button for input type=file. This works fine except that the form will only submit after the SUBMIT button is clicked twice. Any ideas on why this is happening or a workaround? I'm testing on IE Thanks! <html> <head></head> <body> <form name="test_form" method="post" action="test.jsp">
0
1968
by: sreenulanka | last post by:
when i am clicking the browse button image not opened in my applet please help me. // browse button, generate browse event when it clicks if (e.getSource()==browse) { try{ //filedialog open for choosing directory and file name. FileDialog fd=new FileDialog(f,"Browse..",FileDialog.LOAD); fd.show(); MediaTracker mt = new MediaTracker(this);
4
2403
by: developing | last post by:
Hi All, I have a browse button that the user can click to select a file. The button then fetches the file path. This is all working fine except my boss wants some add functionality. I need it to be so that the user can only access Z: and Y: and not W: or X: Any help is highly appreciated. Thanks a lot The current code I am using is is posted below. (this works just fine) Option Explicit Option Compare Database
1
2042
by: ipa | last post by:
Hello, I made one browse button in asp form to store files. Now i am facing the problem is when i am editing that asp form. In that i call browse button during edit.but during edit, that browse button does not fetch or say show the old file path. I wish to show that save file path in browse button of asp form during edit. Can any one guide.
0
9799
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
11168
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10869
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10426
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9591
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7985
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
1
4623
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
4231
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3242
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.