473,406 Members | 2,713 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,406 software developers and data experts.

ie/mac - onChange problems for file input

I have a form that allows a user to upload a file. When they select a
file (onChange), I call a JS function that analyzes the filename for
specific keywords and then populates a multiple select box with the
keywords.

The problem is, IE for Mac doesn't do the onChange properly. In all
other browsers, as soon as I select the file, the onChange fires and
the filename gets analyzed, etc. In IE for Mac, I have to click away
from the file input box for the onChange to take effect. The user won't
know to do this.

I've tried a ton of things already, including setting timers that force
the file input to lose focus. Nothing seems to work.

Here's a link to the page:
http://web.cfa.arizona.edu/memoria/tools/upload.php

Anyone have any ideas?

Thanks.

--Don D.

Jul 23 '05 #1
2 3097
DonD wrote:
I have a form that allows a user to upload a file. When they select a
file (onChange), I call a JS function that analyzes the filename for
specific keywords and then populates a multiple select box with the
keywords.

The problem is, IE for Mac doesn't do the onChange properly. In all
other browsers, as soon as I select the file, the onChange fires and
the filename gets analyzed, etc. In IE for Mac, I have to click away
from the file input box for the onChange to take effect. The user won't
know to do this.


onchange is supposed to fire when the control loses focus, so in fact
IE Mac is doing it by the book.

"The onchange event occurs when a control loses the input focus and
its value has been modified since gaining focus. This attribute
applies to the following elements: INPUT ,SELECT , and TEXTAREA ."
<URL:http://www.w3.org/TR/html4/interact/scripts.html#adef-onchange>

What's the fix? Change your UI so that users know to click away from
the input, say with an 'analyse file path' button or such. Or just
expect that some users will not have their path analysed - those
without JavaScript won't either.
--
Rob
Jul 23 '05 #2
Rob,
Thanks for the response. I think the other browsers are doing it
according to spec also. The difference is that they blur the file input
field automatically, which is nice. There's no reason not to. I feel
like IE/Mac is being lazy.

I'll consider the exta button. I was hoping I wouldn't have to do that.
It's a pretty streamlined process when it auto-analyzes.

Thanks again.

--Don D.

Jul 23 '05 #3

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

Similar topics

3
by: Lee Mundie | last post by:
Hi there, Simple problem here but can't seem to fix it! Okay, I have a select list from which people choose avatars... the list is option values ie. <option>Worm</option> ...
4
by: rick | last post by:
The following basic script works fine in firefox by not in IE. Can anyone spot the problem? In IE I can only delete the first line but not the lines created by javascript. Also, look at the HTML...
1
by: Ron Brennan | last post by:
I've spent all morning on this and now think there is a (slight?) possiblity that onchange doesn't work for input type="file". Can anybody shed any light on this. The onblur fires just fine. The...
1
by: Christoph | last post by:
I'm trying to validate some HTML form elements when the user tabs out of each element. However, I'm having some problems. It appears that the order of events is onChange followed some time...
5
by: Good Man | last post by:
Hi there I'm adding form fields on the fly with some javascript DOM programming. I basically just clone a hidden <div>, then adjust node properties to make this new <div> have unique values...
3
by: jab3 | last post by:
Hello. I"m new to this group, and to JavaScript in general, so please forgive me if I breach local etiquette. I'm trying to implement some client-side 'dynamic' validation on a form. I'm having...
7
by: Tim Slattery | last post by:
I'm trying to handle the onChange event in an <input type="file"> element. In IE, there's no problem: the event fires when a file in the "open" box is doubleclicked, or the "Open" button in the box...
21
by: Leena P | last post by:
i want to basically take some information for the product and let the user enter the the material required to make this product 1.first page test.php which takes product code and displays...
7
by: kirkgilbert | last post by:
I am trying to do an onchange event in a form using a text field. The form is tied to a record set that is part of a repeated region. One the first record when I edit the data it works perfectly. ...
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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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...
0
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,...
0
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,...
0
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...
0
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,...
0
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...

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.