473,546 Members | 2,196 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Q: Html/JS form input element file upload?

(Sorry if this appears twice)

Hi,

I know this has probably been beaten to death but
I was working with Class by Stickman --
http://www.the-stickman.com which uses DOM to
create multiple file input elements in a form.

I'm trying to just hide all the form input elements
of type file and providing a link to call each one's
click() method. This works fine except when submitting
the actual form. IE 6 complains with "Access is denied"

Try copy/pasting the HTML below (don't forget the
attachment) and if you click the regular "Browse..."
button and submit then it works.

If you click the "My Browse..." link, select one file,
and try to submit, get "Access is denied"

Windows XP Pro SP2 with IE 6


<html>
<head>

<script src="multifile_ compressed.js"> </script>

<script language="Javas cript">
function myBrowse() { document.form1. file_1.click(); }
</script>

</head>
<body>

<a href="javascrip t:document.form 1.submit()">Sub mit Me</a>
&nbsp;&nbsp;&nb sp;&nbsp;
<a href="javascrip t:myBrowse()">M y Browse</a>
<br><br>

<form name="form1"
enctype="multip art/form-data"
action="javascr ipt:alert('it works!!')"
method="post">

<input id="my_file_ele ment" type="file" name="file_1" > <!-- The
file element -- NOTE: it has an ID -->

<input type="submit">
</form>
Files:
<!-- This is where the output will appear -->
<div id="files_list" ></div>
<script>
<!-- Create an instance of the multiSelector class, pass it the
output target and the max number of files -->
var multi_selector = new MultiSelector( document.getEle mentById(
'files_list' ), 5 );
<!-- Pass in the file element -->
multi_selector. addElement( document.getEle mentById(
'my_file_elemen t' ) );
</script>

</body>
</html>
Mar 17 '06 #1
1 4463
Rob Mitchell wrote:
(Sorry if this appears twice)


See news:19******** ********@Pointe dEars.de
Score adjusted

PointedEars
Mar 18 '06 #2

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

Similar topics

4
12950
by: hamacher | last post by:
I have a particular need to an application . . . I need users to specify a directory (with path) on their filesystem on an HTML page. All I need at the server is a string representation of the path they choose. No file upload. No file names. Right now, I have users typing in full paths into an <input type="text"/> element. I would...
4
2794
by: John Fereira | last post by:
So, one of the limitations of multipart-form handling is that when an <input type="file" ..> tag is used it will bring up a window which allows a user to select a file for upload but won't allow the user to select multiple files. As you may know, the tag produces a text input field with an adjacent button for selecting a file from the local...
21
66774
by: strutsng | last post by:
<input type="file"> only allows the user to browse for files. How about "browse for folder" dialog? Can html/javascript do that? I couldn't find any syntax for that. If not, please advise what are the other approaches. please advise. thanks!!
1
31509
by: John Wolff | last post by:
I’m trying to upload a file to a Web Service. I have to submit the file using a standard HTML form with the <input type=“file” /tag. Ultimately, we are submitting the file from a Flash 8 application that uses Macromedia’s flash.net.FileReference class. The FileReference class behaves like a standard HTML form with the file input...
27
4690
by: Chris | last post by:
Hi, I have a form for uploading documents and inserting the data into a mysql db. I would like to validate the form. I have tried a couple of Javascript form validation functions, but it appears that the data goes straight to the processing page, rather than the javascript seeing if data is missing and popping up an alert. I thought it...
4
1731
by: redoranda | last post by:
hi im a new user here. apparently im working on a project that is creating a dynamic form. Assume user can insert the data into text field and upload csv file, csv file may have two columns. user has to provide a special character like <> in text field to replace with data from second column of csv file. here is the tmpl code: <tr> <td...
2
1706
by: robert112 | last post by:
This is quite a hard one guys. ***Some necessary back ground Info*** I have an asp.net 1.1 application that uses a WYSIWYG to return some html created by the user in the admin section of the application. The html that the user creates is a survey or form made up of textbox's, radio buttons and drop downs. The form gets saved to a sql...
8
8759
by: VUNETdotUS | last post by:
My goal is to upload files without submitting the form. I am not looking for the code here but rather a concept. I did a little research and discovered that I can submit a form to an invisible dynamically creeated iframe (to avoid page reloading) and the server page will invoke the client page (where the form is) with window.parent.foo...
10
6934
by: happyse27 | last post by:
Hi All, I got this apache errors(see section A1 and A2 below) when I used a html(see section b below) to activate acctman.pl(see section c below). Section D below is part of the configuration of section c. Not sure where went wrong as the web page displayed internal server error. Also, what is the error 543? and error 2114....
0
7507
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, well explore What is ONU, What Is Router, ONU & Routers main...
0
7698
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. ...
1
7461
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...
0
6030
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 projectplanning, coding, testing, and deploymentwithout human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5361
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...
0
5080
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...
0
3492
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3472
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1922
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 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.