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

  • SEARCH
  • Home
  • 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 3976058
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T04:45:34+00:00 2026-05-20T04:45:34+00:00

I have defined some click event handlers as follows: $(document).ready(function () { /* *

  • 0

I have defined some click event handlers as follows:

$(document).ready(function () {
  /*
  * Since the "Start Upload" button is available, we don't need to worry about starting the 
  * upload when the user clicks "Update". But we need to make sure to display an error message
  * if there are files in the uploader that have not been uploaded yet.
  */
  $('#myAccount p.buttons input[alt="Update"]').click(function (event) {

    // check if there are files in the uploader
    if (uploader.files.length > 0) {

        // if there are files that have not been uploaded yet, we need to show an error message
        if (uploader.total.uploaded != uploader.files.length) {

            // if the error message hasn't been created yet, create it
            // else, it'll already be visible so we don't need to do anything
            if ($('#upload_error').length == 0) {
                $('<p id="upload_error">Error!</p>').insertAfter('#myAccount p.buttons input[alt="Cancel"]');
            }
            event.preventDefault(); // stop the click event
        }
    }
    // continue click event as normal
  });
});

… and …

// if the cancel button is clicked, then remove the files from the uploader
$('#myAccount p.buttons input[alt="Cancel"]').click(function (event) {
    uploader.splice(0, uploader.files.length);
    // continue click event as normal
});

Both work fine in Firefox, but in IE8 and IE7 (compatibility mode), these do not work all of the time.

To be a bit more specific, this “uploader” stuff is related to the Plupload file uploader. Essentially, I have this uploader within a form. The form submits fine and the above click handlers work fine if I don’t touch the uploader at all.

However, in the following case, the above click handlers don’t work: I queue files and let the uploader do its thing, so all files have been uploaded; now I click submit on the form and nothing happens, but I expect the form to submit. Anytime I interact with the uploader, the click event handlers don’t work.

I hoping my comments clarify my intentions. Any ideas as to why this isn’t working in IE 7/8? What am I doing wrong? Is the event.preventDefault() handled differently in IE?

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-20T04:45:34+00:00Added an answer on May 20, 2026 at 4:45 am

    I just switched to the Flash runtime. It seems to be working okay for now.

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

Sidebar

Related Questions

For example, let's say I have $(element).on('click', function() {/*Some Stuff*/}); defined somewhere, then later
I have a click function defined on the document and when clicked I want
I have a javascript object which has some defined variables and attaches some event
I have a c# COM server defined some delegate for event handling. This is
I have defined some Error Messages and my Question is, how to access them
In express, I have defined some routes app.post(/api/v1/client, Client.create); app.get(/api/v1/client, Client.get); ... I have
I have a problem with Focusable Buttons on Eclipse Rap. I have defined some
I have defined a table type PL/SQL variable and added some data there. create
I have made a Java class where I have defined a constructor and some
I would like to export some macros that I have defined and be able

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.