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

How to trigger file input .click() event in Firefox

2
Hi i got a file input object, but i want it to be hidden, and then i user a picture as button to trigget that hidden file input object, the thing is it works fine on IE, but on Firefox wont do anything, not even errors, anyone knows how to trigger the click() event on Firefox?

Here is my code:

[HTML]function open_filebrowser(){
document.getElementById("fileBrowse").click();
}

<input type=file id='fileBrowse' style='display:none;'>
<img id="bf" src="graphics/open.gif" style='cursor:pointer;' onclick='open_filebrowser();'>[/HTML]
Sep 20 '07 #1
2 20687
acoder
16,027 Expert Mod 8TB
Opera and Firefox don't support the click() method for input file elements.

However, see Styling an input type="file"
Sep 20 '07 #2
acoder
16,027 Expert Mod 8TB
Changed the thread title to better describe the problem.
Sep 20 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Joachim | last post by:
I wonder if it is possible and if it is how it is done to trigger a right-click event performed on a command button in Visual C++ 6? The ClassWizard only gives two options: BN_CLICKED and...
2
by: lavu | last post by:
I am trying to start a C# GUI App and automatically trigger a button click event. However when I add a statement btn.PerformClick to my Main() I get an error that a class was expected . This...
4
by: bcumminsr | last post by:
Hi, I have a input="type" control and two WebControls.Buttons that do not respond to click events if I type into the file input box a network path and file. I have a break set on the click event...
2
by: cumars | last post by:
Hello Friends, I want to trigger both the click event and double click event in a single button separately. (i.e.) the user can trigger both the single click and the double...
17
by: Eric | last post by:
I'm new to JavaScript and I wrote this code to play with. Oddly, if I enter text in a box and then press the button, I only get the onChange event for the text box and not the button's onclick...
4
by: LyzH | last post by:
Someone else had a question on how to emulate a mouse click. I tried posting in that thread but I have something of a twist on this problem and I'm really in trouble here! If I don't get help...
1
by: HopfZ | last post by:
I tried the javascript code dispatching click event to a link in Firefox(2.0.0.4), it does not work, it does trigger onclick handlers but doesn't trigger browser default action, that is, opening...
2
by: Andrew | last post by:
Hi I would like to be able to trigger the "on click event" of a button from the code within a different form. Does anyone know if this is possible and if so how. TIA Andrew
1
by: paragbhavsar | last post by:
Hello Friends, Can we simulate click event of Input File Control through Javascript - I want this for Firefox 3.5 browser ? I have also tried with following code. Please let me know solution...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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...
0
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...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
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
tracyyun
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...
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.