473,597 Members | 2,190 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

file upload question...

I need to use an image instead of the normal "Browse" button for a file
upload. I've seen the articles such as this one:
http://www.quirksmode.org/dom/inputfile.html , but the one problem is
that I don't want the text box with the file path to be visible OR
available. I was able to make it only 1 pixel wide and hidden, but a
cursor can still occur in the box if the person clicks on the right
spot.
In GMAIL, you can click on the link that says "attach file" and the
browse window pops up. I need something like that.
I've looked everywhere. Does anyone have any ideas?
Thanks.
Brian Munz

Aug 2 '05 #1
2 1525
br********@gmai l.com wrote:
I need to use an image instead of the normal "Browse" button for a file
upload.
Why do you need to present the user with a non-standard UI control?
I've seen the articles such as this one:
http://www.quirksmode.org/dom/inputfile.html , but the one problem is
that I don't want the text box with the file path to be visible OR
available.
Why not? Are you trying to make life more difficult for your users?
In GMAIL, you can click on the link that says "attach file" and the
browse window pops up.


When I click "attach file", it appears to simply dynamically add a standard
input of type file to the form.
--
David Dorward <http://blog.dorward.me .uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is
Aug 2 '05 #2
br********@gmai l.com wrote:
In GMAIL, you can click on the link that says "attach file" and the
browse window pops up. I need something like that.
I've looked everywhere. Does anyone have any ideas?


Two options off the top of my head...

1. Hidden div element that contains it
2. Use document.write to insert it where you want.
Aug 3 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
710
by: Mosher | last post by:
Hi all, this might be more of an html question but I think it can be done in PHP, so I will ask here. I have an html form that allows for .pdf file uploads. This script will serve two functions 1) upload a .pdf file to a specific directory on the web server and 2) create an entry into the db that includes the name of the file just uploaded. I want to have another web page that will dynamically list all of the names of the files uploaded...
13
4295
by: Sky Sigal | last post by:
I have created an IHttpHandler that waits for uploads as attachments for a webmail interface, and saves it to a directory that is defined in config.xml. My question is the following: assuming that this is suppossed to end up as a component for others to use, and therefore I do NOT have access to their global.cs::Session_End() how do I cleanup files that were uploaded -- but obviously left stranded when the users aborted/gave up writting...
6
4128
by: tshad | last post by:
I have an upload file input as: <input id="MyFile" style="width:300px" type="File" runat="Server"> This works fine, but I find that if my page doesn't pass validation during postback, the page comes back with all the data intact, except for the upload object. The text box for "MyFile" (my example) is always cleared. Why is that and is there a way to stop that from happening? Thanks,
4
4464
by: Matt Jensen | last post by:
Howdy I've got a rather strange issue occuring. I used forms based .NET authentication, although I'm also setting some session variables when people login. However, I've found when people use one of my webform pages which includes a button that pops up a window where you can upload files, if you upload files in this popup window, it seems to somehow clear out all of the session variables and the users get logged out. However, if...
1
2714
by: joshbeall | last post by:
Hi All, If I drop a form onto my page that allows file uploads, I know well enough how to handle the file upload in the server side via PHP. However, I have a question: when my browser actually *sends* a binary file (e.g., an image), does it encode it somehow for the upload? Or does it simply send a raw bytestream? The reason I am asking is that I am in the process of transferring some
9
2406
by: CGW | last post by:
I asked the question yesterday, but know better how to ask it, today: I'm trying to use the File.Copy method to copy a file from a client to server (.Net web app under IIS ). It looks to me that when I give a path like @"C:\holdfiles\myfile.txt" it looks on the server C drive. How do I pull from the client? Do I need a different class and/or method? Filestream? -- Thanks,
7
3177
by: pbd22 | last post by:
hi. i am having probs understanding how to grab a file being uploaded from a remote client. i am using hidden input fields for upload such as: <input id="my_file_element" type="file" name="file_1" size=46 /><input type=submit /> so, after adding a few files, the input fields look like this:
2
4253
by: will.smothers | last post by:
All, I have two Windows Server 2003 boxes running IIS 6.0 webservers that host our proxy pac file. These two servers are behind a network load- balancer and house our corporation's Proxy PAC file. I am working on developing an ASP-based file upload solution for our Proxy team so that when they make a change to the PAC file, they simply have to go to this upload site, browse for the new PAC file on their system and then upload it to the...
1
1885
by: lPrentice | last post by:
Hello, After all this time, Linux file permissions still confuse me at times. I have a Python web-based application with an file (images) upload module. The application is running on two remote servers and a local server on my development network. The upload module works just fine when I'm uploading to my remote servers. But when I try to upload to my development server, I get a permission error. What I don't understand is who is...
12
2478
by: GuangXiN | last post by:
I want the file upload element disappear, instead of it, I place a text box and a button with my own css defination. but it doesn't work on IE7. What should I do now? <form action="upload.php" method="POST" enctype="multipart/form-data"> <p> <span>Select photo:</span> <input type="file" name="photo" style="display:none;"> <input type="text" name="photoUrl" class="s1" /> <input type="button" class="s2"...
0
7969
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8272
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...
0
8381
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8035
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
8258
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
6688
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
5847
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...
0
5431
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
3927
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.