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. 2 3120
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#ad ef-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
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. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
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> <option>Frog</option>
etc etc and is in an include file...
where the word i.e. worm sources the image ..images/worm.gif - simple so
far...
|
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 code for the first line
(click the Table HTML button:)) you will fine that the code displayed is not
the same as
was written. "onChange" was changed to "onchange" etc. Please help.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">...
|
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 code is being created inside a
servlet and my version of IE is 5.0.
<td>
<input type="file"
id="pictureFile"
value="Null"
name="pictureFile"
|
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 afterwards by onBlur. I believe this to be the
case because in my onChange script, if the validation fails,
I force focus back to the field element. However, the focus
still falls to the next field and not back to the field I tried to
force the...
|
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 (style, size, etc.)
the original code of the input tag is:
<input type="file" onchange="alert('original')" size="30" id="filea"
name="filea">
| |
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 a couple of
problems, which I'll try to describe. But this e-mail will only
reproduce one of them, in a "short" example. What I'm generally doing
is having each form entry contained in a div, which as a label, an
input with some event handlers,...
|
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 is
clicked, or "Enter" is hit in the attached text box. I can get the
value of the element.
But in Netscape 7, onChange doesn't fire until focus leaves the
element. When you double-click a file name or click "open" in the Open
box, the...
|
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 prodcut anme have used
ajax to avoid refreshing of page this works fine
2.now i have created one row with
checkbox|select box|text|text|text|text|
where in the select box values are fetched from table here also i have used ajax for getting the m_name...
|
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. When I go to the second record nothing happens. I have attached the code below: I bolded text that contains the javascript and fields this is applied to
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<!--#include file="Connections/FutureOrders.asp"...
|
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...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
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: 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...
|
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: 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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
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: 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...
| |