Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / HTML, CSS, Scripts / JavaScript / November 2006



Tip: Looking for answers? Try searching our database.

fire fox on mac and file input

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
ja - 30 Nov 2006 13:04 GMT
hi,

i need to assign onclick function to file inupt, in fire fox on windows
function is executing just after click, but on mac it seems to be execut
after file browse window is closed (in safari it works ok).

did any one meet the same problem? any work around?

greets
wojtek
Fred - 30 Nov 2006 13:57 GMT
> hi,
>
[quoted text clipped - 3 lines]
>
> did any one meet the same problem?

You have described a particular behaviour, whether it is a problem or
not depends on your point of view.  My version of Firefox on OS X
behaves the same as yours - I can't comment on whether it's a problem
without knowing more about why I should think so.

For example:

 <input type="file" onclick="alert(this.value);">

May work better if the browse dialog comes up first.

> any work around?

You mean, can you force the click event to be triggered before the
browse dialog is activated rather than after? No, not that I know of
(OK, the trivial response is to modify the browser source code, but
that is not useful advice for most people).

Signature

Fred

ja - 30 Nov 2006 15:21 GMT
> You mean, can you force the click event to be triggered before the
> browse dialog is activated rather than after? No, not that I know of
> (OK, the trivial response is to modify the browser source code, but
> that is not useful advice for most people).

thanks,

i have input file on div with is hidding and showing when user cilck some
element. It's something like this

<img onclick="show('divWithInput'); delyHide =
setTimeout(hide(''divWithInput''), 1000);" >

and in input
<input type="file" onclick="clearTimeout(delyHide);">

so, ther's is no way to get this working in ff on mac. let it be, i'll
change onclick with onmouseover it wont be exactly what i need, but will be
working :) i hope

BTW
shouldn't it works like this:
<input type="file" onclick="clearTimeout(delyHide);"
onchange="alert(this.value);">

wojtek
ASM - 30 Nov 2006 17:19 GMT
ja a écrit :
> It's something like this
>
[quoted text clipped - 3 lines]
> and in input
> <input type="file" onclick="clearTimeout(delyHide);">

Isn't it too late ? (1 second is not a very long delay)

this here works :

   <input type="file" onmousedown="clearTimeout(delyHide);">

Signature

Stephane Moriaux et son moins vieux Mac déjà dépassé
Stephane Moriaux and his less old Mac already out of date

ja - 30 Nov 2006 18:24 GMT
> Isn't it too late ? (1 second is not a very long delay)
>
> this here works :
>
>    <input type="file" onmousedown="clearTimeout(delyHide);">

1 second, it was only example :)
thanks, i complety forgot about onmousedown...

wojtek
ASM - 30 Nov 2006 17:07 GMT
ja a écrit :

> i need to assign onclick function to file inupt,

I don't unterdstand somebody has to fire by JS a file input.

> in fire fox on windows
> function is executing just after click, but on mac it seems to be execut
> after file browse window is closed (in safari it works ok).

Did you try "onchange".

> did any one meet the same problem? any work around?

Signature

Stephane Moriaux et son moins vieux Mac déjà dépassé
Stephane Moriaux and his less old Mac already out of date

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.