473,383 Members | 1,984 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

Uploading files with IE

Hi, I'm writing a class that will enable the user to upload files to
the server without reloading the current page (using target="iframe"),
and it works just fine in Firefox, but when I test it in IE, first of
all, the iframe is not targetted at all, and IE stupidly opens a new
window, second the <input type="file" element looses it's name
attribute for some reason... I tried using DOM and assigning the
element thru innerHTML, both will just not work in IE (and will just
fine in Firefox). Those interested to have the source code (commented
in french) may just ask me. But if anyone had similar problems, and
would want to share with me, I'd really much appreciate, because this
is driving me insane !

Thanks !

Jul 29 '06 #1
2 1381
Yanick said the following on 7/29/2006 12:30 PM:
Hi, I'm writing a class that will enable the user to upload files to
the server without reloading the current page (using target="iframe"),
and it works just fine in Firefox, but when I test it in IE, first of
all, the iframe is not targetted at all, and IE stupidly opens a new
window, second the <input type="file" element looses it's name
attribute for some reason... I tried using DOM and assigning the
element thru innerHTML, both will just not work in IE (and will just
fine in Firefox). Those interested to have the source code (commented
in french) may just ask me. But if anyone had similar problems, and
would want to share with me, I'd really much appreciate, because this
is driving me insane !
What this has to do with javascript, I am not sure. But, post a URL to a
sample page that displays the behavior.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Jul 29 '06 #2
What this has to do with javascript, I am not sure. But, post a URL to a
sample page that displays the behavior.
Well, first of all, the class is written in Javascript... but anyways,
I've found the answer I was looking for ; the problem comes because IE
doesn't like direct DOM manipulation (for some reason) so, instead of
passing the <inputelement (created via document.createElement), I
created the whole <formblock from a string (i.e. : "<form id="blah"
....><input name="foo" type="file" /></form>"), then I set var
inputElement = document.getElementById('foo'); ... to cut the whole
thing short, instead of using createElement (that IE doesn't like) I
passed by the getElementById, and it worked...

BTW : I always wondered by innerHTML was faster than the DOM functions
?

Well... to those with the same problem, mine is solved :)

Thanks anyway Randy.

Jul 30 '06 #3

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

Similar topics

4
by: dickiedyce | last post by:
Hi there. I've spent the weekend getting ever more frustrated, trying to get an upload file function working on a website. The site is hosted by a company called oneandone. They're using PHP...
5
by: Kevin Ollivier | last post by:
Hi all, I've come across a problem that has me stumped, and I thought I'd send a message to the gurus to see if this makes sense to anyone else. =) Basically, I'm trying to upload a series of...
5
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...
13
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...
0
by: Raj | last post by:
Hello, I am planning to provide the Pause/Resume while uploading files. Our site is using both java applet and activex to do this. The list of selected files will be stored in an encrypted...
221
Atli
by: Atli | last post by:
You may be wondering why you would want to put your files “into” the database, rather than just onto the file-system. Well, most of the time, you wouldn’t. In situations where your PHP application...
2
by: =?ISO-8859-1?Q?=22=C1lvaro_G=2E_Vicario=22?= | last post by:
jodleren escribió: I haven't found the PHP manual page where such feature is documented but a few tests have shown that this behaviour changes depending on the charset parameter of the...
1
by: =?Utf-8?B?RGFu?= | last post by:
MS won't seem to let me reply to my old post, so I created a new one. The error occurs in all browsers. It's definitely a server issue, not client. The server is not proxied in any way. I tried...
3
by: muziburrehaman | last post by:
i am looking for code in php to upload the 1 gb files. any one can please help me by sending the code....
0
by: LoriFranklin | last post by:
I'm a bit of a newbie here. I've learned a lot from reading the posts you all have here. I need some help uploading files using an asp form. I am using some code that I found from Jacob at...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.