Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6755617
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T13:25:29+00:00 2026-05-26T13:25:29+00:00

This picture upload script does not work in google chrome but works well in

  • 0

This picture upload script does not work in google chrome but works well in firefox and internet explorer. Please can someone help?

$("a#picUpload").bind('click', function() {
    $(":input[type=file]").click();
});

Secondly, after selecting a picture and clicking the open button on the open dialogue box, i want the picture upload to start automatically after the open dialogue box unloads but I can’t figure out how to do this. The upload is ajax. Any suggestion? Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T13:25:29+00:00Added an answer on May 26, 2026 at 1:25 pm

    I think the first issue can be solved by introducing a space after ‘a’ before ‘#’. I assume that ‘picUpload’ is the id of anchor element. In that case you don’t have to use the ‘a’ at all. Just use ‘#picUpload’ for binding the click event to the element. I prefer the second method, where you use the #id alone to get the jQuery object of that element.

    $("#picUpload").bind('click', function() {
        $(":input[type=file]").click();
    });
    

    I also suggest you to check your form for any other element having the same id as ‘picUpload’ element. Things can go wrong in that case.

    To start upload of file automatically after the file is selected use the ‘change’ event of input:file element.

    $('#fileUpload').change(function() {
        alert('changed');
        //call your ajax function for uploading file
    });
    

    For the above script to work, form should be as given below

    <form>
       <a id='picUpload' href='#'>Upload picture</a>
        <input id='fileUpload' type="file"/>
    </form>
    

    Fiddle here: http://jsfiddle.net/deepumohanp/vvVWt/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I use HttpCilent 4.0.1 to upload picture, but I got HTTP 400 Error, the
I have a laughing problem : I upload a picture on my server. This
I am developing an upload script where you can upload an picture, which is
I have a picture upload module. I don't know how to make a script
I have a script that uploads a picture and resizes it, which all works
In this picture,there are 3 main steps: SetExpressCheckout , GetExpressCheckoutDetails and DoExpressCheckoutDetails ,I'm now
Have a look at this picture alt text http://www.abbeylegal.com/downloads/2009-04-01/web%20part%20top%20line.jpg Does anyone know what css
I want to download this picture using Ruby. How do I do that? http://farm1.static.flickr.com/92/218926700_ecedc5fef7_o.jpg
Whats wrong with this picture? Model: validates_acceptance_of :terms_of_service, :on => :create, :accept => true,
I have a picture in res/drawable directory: res/drawable/picture.jpeg. Can I dynamically update this picture.jpeg

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.