Hi,
In the file field <input type="file" name="file1">, can I modify the button
"Browse..." ?
I want to hide the file field but show a button like "Open". When I click on
this button, it catches a file, and use onchange even to upload this file.
thanks for any idea.
Atse 4 3966
I'm afraid you can't modify that button in current browsers
IIRC, though, there are tricks you can do with CSS layers which might be
able to mask it...
--
Atrax, MVP, IIS http://rtfm.atrax.co.uk/
"atse" <du******@yahoo .com> wrote in message
news:oo******** **************@ news01.bloor.is .net.cable.roge rs.com... Hi, In the file field <input type="file" name="file1">, can I modify the
button "Browse..." ? I want to hide the file field but show a button like "Open". When I click
on this button, it catches a file, and use onchange even to upload this file. thanks for any idea. Atse
Hi, Atse
Please see the code bellow. It uses customized button, you can also use
an image or other HTML element to browse files.
There is one difference with this code and plain type=file field -
client must select file from browse window, cannot copy full path to the
text field.
Antonin
See Pure/Huge ASP upload ( http://www.pstruh.cz) to accept uploaded file
in ASP :-)
<HTML>
<HEAD>
<TITLE></TITLE>
<Script Language='Javas cript'>
function validateFile()
{
document.frm.Im age.click();
var sTmpString = new String(document .frm.Image.valu e);
var iPos = sTmpString.last IndexOf("\\");
document.frm.tx t.value = sTmpString.subs tring(iPos+1,sT mpString.length );
}
</Script>
</HEAD>
<BODY>
<form name="frm">
<input type="file"
name="Image" size="20"
onChange="valid ateFile();" style="visibili ty:hidden;">
<input type="text" name="txt">
<input type="button" value="Browse ..."
onMouseDown="va lidateFile();">
</form>
</BODY>
</HTML>
"atse" <du******@yahoo .com> wrote in message
news:oo******** **************@ news01.bloor.is .net.cable.roge rs.com... Hi, In the file field <input type="file" name="file1">, can I modify the
button "Browse..." ? I want to hide the file field but show a button like "Open". When I click
on this button, it catches a file, and use onchange even to upload this file. thanks for any idea. Atse
Thanks Antonin, but it doesn't work for me, because no file is passed to
upload. I enable Image's visibility, and found the path there. When I click
on the submit button once, the path is clear on the Image field, and the
form doesn't submit. In another word, click once the submit button, the form
doesn't submit, but the Image field is clear the path. Any idea?
atse
"Antonin Foller" <an*****@foller .cz> wrote in message
news:u%******** ********@TK2MSF TNGP12.phx.gbl. .. Hi, Atse
Please see the code bellow. It uses customized button, you can also
use an image or other HTML element to browse files. There is one difference with this code and plain type=file field - client must select file from browse window, cannot copy full path to the text field.
Antonin See Pure/Huge ASP upload (http://www.pstruh.cz) to accept uploaded
file in ASP :-)
<HTML> <HEAD> <TITLE></TITLE> <Script Language='Javas cript'> function validateFile() { document.frm.Im age.click(); var sTmpString = new String(document .frm.Image.valu e);
var iPos = sTmpString.last IndexOf("\\");
document.frm.tx t.value = sTmpString.subs tring(iPos+1,sT mpString.length );
} </Script> </HEAD> <BODY> <form name="frm"> <input type="file" name="Image" size="20" onChange="valid ateFile();" style="visibili ty:hidden;"> <input type="text" name="txt"> <input type="button" value="Browse ..." onMouseDown="va lidateFile();"> </form> </BODY> </HTML>
"atse" <du******@yahoo .com> wrote in message news:oo******** **************@ news01.bloor.is .net.cable.roge rs.com... Hi, In the file field <input type="file" name="file1">, can I modify the button "Browse..." ? I want to hide the file field but show a button like "Open". When I
click on this button, it catches a file, and use onchange even to upload this
file. thanks for any idea. Atse
Yes, the browser doesn't allow this. Although you might be able to
hide the input with a layer or something, you won't be able to pre-set
the file that you want uploaded. You need to use an applet or other
client control like ActiveX to supplement the browser security
limitations.
-Tom
"Atrax" <at***@dontspam atrax.co.uk> wrote in message news:<u3******* *******@TK2MSFT NGP09.phx.gbl>. .. I'm afraid you can't modify that button in current browsers
IIRC, though, there are tricks you can do with CSS layers which might be able to mask it...
-- Atrax, MVP, IIS
http://rtfm.atrax.co.uk/
"atse" <du******@yahoo .com> wrote in message news:oo******** **************@ news01.bloor.is .net.cable.roge rs.com... Hi, In the file field <input type="file" name="file1">, can I modify the button "Browse..." ? I want to hide the file field but show a button like "Open". When I click on this button, it catches a file, and use onchange even to upload this file. thanks for any idea. Atse This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Karen Grube |
last post by:
Hi!
Each week, we receive a two-page PDF file from UPS along with a separate
flat file (a CSV) The PDF file contains the overview of our weekly invoice
and the CSV contains the details of each shipment.
I download the file from UPS and then use DTS to import the data into
SQL. At that point, I have a Crystal report that prints what looks like a
regular UPS invoice. The only problem is that I wind up with having to print
two...
|
by: Monte Chan |
last post by:
Hi all,
I have the following codes,
<script language="JavaScript">
function check_stuff(field)
{
alert("blank out the field now");
field.value = "";
}
</script>
|
by: Robert |
last post by:
I have the XML file which has a structure similar to one I pasted at the end
of this post. As you can see many elements are using different id attributes.
For example element Window uses WinID attribute as ID, the ViewData uses
ViewID attribute as an ID and so on. I need to read this file without
assuming what is the order of the elements, in other words I can't read it
sequentially. The reason for this requirement is that whole WindowsInfo...
|
by: yinjennytam |
last post by:
Hi all,
I'm new to .NET and XML and I have a question. Given an XML file, I want to
navigate its content and look for one or two particular elements to get their
values. At this point, it suffices to open the XML file for read-only access.
Once I have processed these values, I might need to update a bunch of
subelements of a certain element. For example, I may need to update the
Field Name attribute plus the DataField element value...
|
by: kev |
last post by:
Hi folks,
I have created a database to store information on equipments. During
the first level of registration, there is a form that i need the user
to fill up details on the equipment testing. i have done this one.Now
what i need is to enable the users to upload files and save it into the
corresponding table.
Example: 3. A laser inventory form has been completed for each 3b or
4 laser and submitted to the Laser Safety Officer...
| |
by: Richard |
last post by:
Which way would you guys recommened to best parse a multiline file which contains
two fields seperated by a tab. In this case its the
linux/proc/filesystems file a sample of which I have included below:
nodev usbfs
ext3
nodev fuse
vfat
ntfs
nodev binfmt_misc
|
by: hotflash |
last post by:
Hi All,
I found the best pure ASP code to upload a file to either server and/or MS Access Database. It works fine for me however, there is one thing that I don't like and have tried to fix but don't have any luck is to do a form validation. This script requires the files: db-file-to-disk.asp and _upload.asp. There is a DESCRIPTION field in the db-file-to-disk.asp file, what I want to do is the user has to field out this fied before...
|
by: lxyone |
last post by:
Using a flat file containing table names, fields, values whats the
best way of creating html pages?
I want control over the html pages ie
1. layout
2. what data to show
3. what controls to show - text boxes, input boxes, buttons,
hyperlinks ie the usual.
The data is not obtained directly from a database.
|
by: Tommy Grav |
last post by:
I have a file with the format
Field f29227: Ra=20:23:46.54 Dec=+67:30:00.0 MJD=53370.06797690 Frames
5 Set 1
Field f31448: Ra=20:24:58.13 Dec=+79:39:43.9 MJD=53370.06811620 Frames
5 Set 2
Field f31226: Ra=20:24:45.50 Dec=+78:26:45.2 MJD=53370.06823860 Frames
5 Set 3
Field f31004: Ra=20:25:05.28 Dec=+77:13:46.9 MJD=53370.06836020 Frames
5 Set 4
|
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...
|
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...
| |
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...
|
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...
|
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();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
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...
| |