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 6745057
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T12:09:31+00:00 2026-05-26T12:09:31+00:00

I have this jquery button click function: $(#NextButton_ButtonCtrl).live(click, function (event) { var i =

  • 0

I have this jquery button click function:

   $("#NextButton_ButtonCtrl").live("click", function (event) {

    var i = 0;
    var success = 1;
    var n = $("input[type=File]").length;
    alert('number of files:' + n);

    $("input[type=File]").each(function () {

        success = 0;
        alert('for is here');
        /*var labelId = "FondationLabel" + i + "_LabelCtrl";
        var intitule = $("span[id=" + labelId + "]").text();
        var style = $(this).attr('style');
        var value = $(this).val();

        if (value == "" && style == "True") {
        success = 0;

        $("#errorSpan").html('<span ID=errorSpan class=error-span >Merci de charger le fichier' + intitule + '</span>');
        //var MPE = $find("MPE");
        // MPE.show();
        alert('Merci de charger le fichier' + intitule);

        return false;
        }
        i = i + 1;*/

    });
    alert(success);
    if (success == 0) {

        event.preventDefault();
        return false;
    }

the problem is when testing with ie :

 var n = $("input[type=File]").length;
        alert('number of files:' + n);

i get 0,chrom 4 (correct)

  • 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-26T12:09:31+00:00Added an answer on May 26, 2026 at 12:09 pm

    try a lowercase file $("input[type=file]").length as oppose to File

    Reference from sitepoint.com

    http://reference.sitepoint.com/css/attributeselector

    Case Sensitivity The value specified in an attribute selector is case
    sensitive if the attribute value in the markup language is case
    sensitive. Thus, values for id and class attributes in HTML are case
    sensitive, while values for lang and type attributes are not.

    XHTML, when served as XML, is always case sensitive; see Differences
    Between HTML and XHTML for more on this.

    It’s not always easy to remember which HTML attributes are case
    sensitive and which aren’t. It’s usually best to assume that
    everything is case sensitive, but don’t rely on it!

    UPDATE SECOND QUESTION

    $("input[type=File]").each(function (i,n) {
        //$(n).attr('style');// note each. has a i,n on the function passed i, is for the increment, n is for the nth element,
        // sometimes, the each function when using $(this) may refer to every element selected, 
        // so i,n is the correct way to do it,
    });
    

    UPDATE 2

    http://msdn.microsoft.com/en-us/library/985bhaz6.aspx

    please check this how to add attributes, I’m not familiar with it but I think/hope this would work

    writer.AddAttribute("data-style", "true");

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

Sidebar

Related Questions

I have this code in jquery : $(#order_btn).click(function(){ var totalprice = $(.price_amount).text(); $(#totalprice).val(totalprice); });
I have this jquery code : $(document).ready(function() { $('div.badge_button > .more').click(function() { var id
I have this jQuery which works fine $(li[id^='shop_id']).click( function () { alert(I clicked on
I have this code in jQuery.. $(document).ready(function(){ var fieldCounter = 0; ... I have
I have this code - jQuery('.wymeditor').wymeditor( { html: '<p>Hello, World!<\/p>', postInit: function(wym) { var
I have a jquery-ui-dialog that contains a <form> which contains a <input type=file >
I have jQuery code which looks something like this on Button1 Click $('table.result_grid tbody
I have this jQuery code that queries an API on a keyup event (via
I have this jQuery: $(document).ready(function() { $(#panel).hide(); $('.login').toggle( function() { $('#panel').animate({ height: 150, padding:20px
OK, I've checked this thread: Prevent click event in jQuery triggering multiple times and

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.