473,750 Members | 2,182 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

HTML Input=file - specify file type.

UJ
Is there any way on an input="file" to specify what the default accepted
types are? I don't want to have the user even be able to see the wrong type.

TIA - Jeff.
Apr 25 '06 #1
3 3384
Jeff
Then try validating the input.
I mean the file extensions.
Patrick

"UJ" <fr**@nowhere.c om> wrote in message
news:uE******** ******@TK2MSFTN GP03.phx.gbl...
Is there any way on an input="file" to specify what the default accepted
types are? I don't want to have the user even be able to see the wrong
type.

TIA - Jeff.

Apr 25 '06 #2
UJ
I'm already doing that in code. I'd like to have it so that when the dialog
box comes up, if I want them to select a *.txt file, it only shows the .txt
files.

"Patrick.O. Ige" <na********@hot mail.com> wrote in message
news:O0******** ******@TK2MSFTN GP05.phx.gbl...
Jeff
Then try validating the input.
I mean the file extensions.
Patrick

"UJ" <fr**@nowhere.c om> wrote in message
news:uE******** ******@TK2MSFTN GP03.phx.gbl...
Is there any way on an input="file" to specify what the default accepted
types are? I don't want to have the user even be able to see the wrong
type.

TIA - Jeff.


Apr 25 '06 #3
> Is there any way on an input="file" to specify what the default accepted
types are? I don't want to have the user even be able to see the wrong type.

TIA - Jeff.


According to the standards-definition, there is an "accept" attribute.
http://www.w3.org/TR/html401/interac...tml#edef-INPUT
BUT: no browser supports it (as far as I know)

Hans Kesting
Apr 25 '06 #4

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

Similar topics

2
3182
by: Mike Wilcox | last post by:
I have the following two files used to insert data into a database. when meinsert.php is executed a blank record is inserted in the database as if the .php file is not receiving the variables. Any ideas why this might be happening? Environment is stock RH9 with no updates. I believe it is PHP 4.2.2 and Apache 2.0.40. Thanks, Mike
4
1964
by: Q | last post by:
Hi, I would like to create the following very simple (I think) web page. Any visitor in an text field can type same text and press button "Send". After this message of visitor have to be printed out below of the text field (somethink like guest book). Of course I can do it like this: <form method="get"> <input type=text name="x" value="">
1
5593
by: andy.t.chou | last post by:
I need to be able to have a hidden field (signiture) with each output html file generated. # (Get the first and last name from the html form) $first_name = $q->param('FirstN'); $last_name = $q->param('LastN'); # attempting to pass the variable information to an output html file to be used as hidden info needed to use later.
2
1764
by: Robert Diamond | last post by:
Hey guys (and girls ;)), I want to create some form data and submit it to the cgi script without having any (DOM) document loaded up. Is there a way in jscript to say... (probably something like...) var myFormObject = new document(actionHref, encryptType, etc..., nameOfFormField, valueOfFormField, etc...); myFormObject.submit();
11
5589
by: Jake j | last post by:
Yes, this is a simple and straightforward thing to do as long as the .js file doesn't use a function. When I try a script with a function in a js file I can't get it to work (though it works fine within the html file). I'm guessing that there's some syntax or convention I'm not doing right. What I most need is an example. Can someone write a js file with an alert command, for example, to keep it simple. Perhaps something like: var...
0
1359
by: darren | last post by:
When using the html input file (input type=file), is there anyway to NOT have the file loaded on the server? I am only interested in using this control to browse to a file and then get the filename, but when the form posts the file ends up on the server. I am using a popup window with 4 input file controls on it, and just want to return the file names to the parent window when the popup window closes, I don't want the files loaded. Is...
2
1394
by: Robin | last post by:
On an ASP.Net web page that has a HTML Input file control run on the server side, is there any setting that limits the size of the file that can be uploaded? Is there any validation code that runs when the value of this type of control is selected?
7
2244
by: Brian | last post by:
I wrote this script here but I cannot get the script to save to the correct month.html. Can someone tell me what is wrong with this code? <html> <head> <title>Monthly Bills</title> </head> <body> <center><font size="4">Total Monthly Bills</font> <form action="billcalculation.php" method="POST">
11
3193
by: nickyeng | last post by:
I have a html file contains a form asking user to select a choice and press enter to pass the data to server. In server there, i have a cgi script(C language) that accepts the input from browser and then output a html page to browser. The browser should open the page, but it didn't, instead, it prompt me to save the file(.cgi file i requested in form method).... how that happens? i want to display the html file that the script output...
0
8999
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
9394
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
9338
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
9256
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
8260
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
6803
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
4885
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3322
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
3
2223
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.