Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    Senior Coder NancyJ's Avatar
    Join Date
    Feb 2005
    Location
    Bradford, UK
    Posts
    3,174
    Thanks
    19
    Thanked 66 Times in 65 Posts

    Error: uncaught exception:

    Code:
    Error: uncaught exception: [Exception... "Index or size is negative or greater than the allowed amount"  code: "1" nsresult: "0x80530001 (NS_ERROR_DOM_INDEX_SIZE_ERR)"  location: "*** Line: 30"]
    my js works fine but I get this message in my javascript console - is it anything to worry about?

    line 30 is :
    Code:
    for(i = 0;i< counter; i++){
    the function is
    Code:
    function setCosts(){
    band = 0;
    var country = document.addform.ShipCountryID.options[document.addform.ShipCountryID.selectedIndex].value;
    for(i = 0;i< counter; i++){
    if (arrCountryIDs[i] == country){
    alert("match");
    band = arrBands[i];
    }
    }
    delivery = 0;
    for(i=0;i<numprods;i++){
    delivery = delivery + eval('arrBand'+band)[i];
    
    }
    document.addform.delivery.value = delivery;
    //document.addform.total.value = formatCurrency(arrCosts[i]+subtotal);
    
    }
    Last edited by NancyJ; 09-27-2005 at 01:10 PM.

  • #2
    Regular Coder
    Join Date
    Aug 2005
    Location
    Toronto, ON, Canada
    Posts
    231
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Where do you set counter?
    rm -f /

  • #3
    Senior Coder NancyJ's Avatar
    Join Date
    Feb 2005
    Location
    Bradford, UK
    Posts
    3,174
    Thanks
    19
    Thanked 66 Times in 65 Posts
    in a different function

    ..cant post the whole thing, its dynamically generated and is huge
    Code:
    counter = arrCountryIDs.push(17.5);

  • #4
    Regular Coder
    Join Date
    Aug 2005
    Location
    Toronto, ON, Canada
    Posts
    231
    Thanks
    0
    Thanked 0 Times in 0 Posts
    chech the counter value prior to line 30:

    alert(counter);
    for(i = 0;i< counter; i++){


    the code:
    counter = arrCountryIDs.push(17.5);
    is unusual (?)

    should it be (?):
    counter = arrCountryIDs.length

    Also it could be a Mozilla bug, check their site:
    http://bugzilla.mozilla.org
    rm -f /


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •