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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T10:33:30+00:00 2026-05-26T10:33:30+00:00

I get this error, only in IE: Object doesn’t support this property or method

  • 0

I get this error, only in IE:

Object doesn't support this property or method
Line: 56
Sign: 5
Code: 0

Javascript code:

    function recalcTotalPrice(item) {
    values = $("input", item).serialize();
    $.post( url,
           values,
           function (data,textStatus, jqXHR) {
              variant_wrapper = $(item).parents(".variant");
              $(".price", variant_wrapper).html(data.total_price);
56:           updateProductPrice(item);
           })
  };

  function updateProductPrice(item) {
    wrapper = $(item).parents('.advertising_product');
    $(".total_price", wrapper).html(sum($(".price", wrapper).map(function() {return parseFloat($(this).html())}).toArray()));
  };

Anyone?


EDIT 1:

Here is the rendered HTML code that triggers the javascript:

<li>
        <label class="month" for="month">Mar</label>
          <div class="week ">
            <input id="386_1_10" name="book[]weeks[]" style="display: none;" type="checkbox" value="1|10" />
            <label for="386_1_10">10</label>
          </div>
          <div class="week ">
            <input id="386_1_11" name="book[]weeks[]" style="display: none;" type="checkbox" value="1|11" />
            <label for="386_1_11">11</label>
          </div>
          <div class="week ">
            <input id="386_1_12" name="book[]weeks[]" style="display: none;" type="checkbox" value="1|12" />
            <label for="386_1_12">12</label>
          </div>
          <div class="week ">
            <input id="386_1_13" name="book[]weeks[]" style="display: none;" type="checkbox" value="1|13" />
            <label for="386_1_13">13</label>
          </div>
      </li>

<script>
  $('#item_386.week_picker_wrapper').weekPicker(
      {
          url: '/products/100/items/386/calc_total_price'
       }
    );
</script>

When the Checkbox is clicked the javascript is called.

Here is the full javascript code:

jQuery.fn.weekPicker = function(options) {
  var self = this;
  var week_picker = new WeekPicker(options, self);
}

jQuery.fn.weekLocker = function() {
  var self = this;
  var week_picker = new WeekLocker(self);
};

WeekPicker = function(options, selector) {

  var url = options.url;
  var yearPos = 0;

  $("a.prev_year", selector).click(function() {
    if (yearPos > 0) {
      $(".year", selector).css("margin-left", --yearPos * -55)
      $(".week_picker", selector).css("margin-left", yearPos * -185)
    }
    return false;
  })

  $("a.next_year", selector).click(function() {
    if (yearPos < 2) {
      $(".year", selector).css("margin-left", ++yearPos * -55)
      $(".week_picker", selector).css("margin-left", yearPos * -185)
    }
    return false;
  })

  $(".disabled input[type='checkbox'], .busy input[type='checkbox'], .locked input[type='checkbox']", selector).click(function () {
    return false;
  })

  $("input[type='checkbox']", selector).change(function() {
    recalcTotalPrice(selector);
  });

  function getValues(selection) {
    return selection.map(function() {return $(this).html()}).toArray().join(",")
  }

  function recalcTotalPrice(item) {
    values = $("input", item).serialize();
    $.post( url,
           values,
           function (data,textStatus, jqXHR) {
              variant_wrapper = $(item).parents(".variant");
              $(".price", variant_wrapper).html(data.total_price);
              updateProductPrice(item);
           })
  };

  function updateProductPrice(item) {
    var wrapper = $(item).parents('.advertising_product');
    $(".total_price", wrapper).html(sum($(".price", wrapper).map(function() {return parseFloat($(this).html())}).toArray()));
  };

  function sum(arr) {
    for(var s = 0, i = arr.length; i; s += arr[--i]);
    return s;
  };

  recalcTotalPrice(selector);
};

EDIT 2:

I got rid of the nasty errors, so now I “only” have one more problem.
This function, wont fire in IE7, IE8

$("input[type='checkbox']", selector).change(function() {
    recalcTotalPrice(selector);
  });

I suspect the it is the “change” that dosent work in IE. I have found this http://www.sitepoint.com/forums/showthread.php?626340-jQuery-change()-event-in-IE-not-triggering-properly-with-checkbox

But I don’t know how to implement it into my code.

  • 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-26T10:33:30+00:00Added an answer on May 26, 2026 at 10:33 am

    I think it’s simply that you forgot var !

    var wrapper = $(item).parents('.advertising_product');
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I get this wired error only when I try to access the web page
I get this cryptic error the first time (and only the first time) my
i get this error {Method 'System.DateTime ConvertTimeFromUtc(System.DateTime, System.TimeZoneInfo)' has no supported translation to SQL.}
I get this error: System.Reflection.TargetException: Object does not match target type. when trying to
This is my code, which sometimes works and sometimes doesn't. var resolve_ajax_login=function(){ $.ajaxSetup({cache:false });
I cannot get to the bottom of this error because it happens only in
I get this error if I follow these steps: Change property Y of an
I get this error: Can't locate Foo.pm in @INC Is there an easier way
I get this error on an update panel within a popupControlExtender which is within
I get this error when I do an svn update : Working copy XXXXXXXX

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.