A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: Javascript sintax error

  1. #1
    Junior Member
    Join Date
    May 2006
    Posts
    8

    Javascript sintax error

    hi,


    does anyone see a js sintax error in this if statement


    if (event.shiftKey) {
    var sel = this.getSelected();
    if (sel.length>0) {
    var first = sel[0], last = sel[sel.length-1];
    var mark = false;
    this.entries.each( function(d, i) {
    if (d==first) mark = true;
    if (d==last) throw $break;
    if (mark && !this.selected[i]) Assets.select(d);
    }.bind(this));
    }
    }



    my debuger sais there is one and IE displays one as well and the script doesnt function

  2. #2
    Product Designer keyone.it's Avatar
    Join Date
    Aug 2001
    Location
    Rome, Italy.
    Posts
    1,625
    that is not the full script..
    anyhow try viewing the page with Firefox and open the Javascript Consolle.
    It will show you any JS errors, if you click on each it will mostly point the actual line that killed the execution.

    Hope this helps...
    Altruism does not exist. Sustainability must be made profitable.

  3. #3
    Junior Member
    Join Date
    May 2006
    Posts
    8
    the full script is 500 lines i loose count reading it and i wrote most of it! can immagine how could a person who reads it for the first time find an erroer in it.

    for debuging i am using "1st javascript editor"

    the script works fine in firefox. its not working at all in internet explorer!
    the sintax error is exactly in this part of the code

  4. #4
    Product Designer keyone.it's Avatar
    Join Date
    Aug 2001
    Location
    Rome, Italy.
    Posts
    1,625
    change
    Code:
     this.entries.each( function(d, i) {
    to
    Code:
     this.entries.each( function(d,i) ) {
    what is this?
    Code:
     }.bind(this));
    Altruism does not exist. Sustainability must be made profitable.

  5. #5
    Junior Member
    Join Date
    May 2006
    Posts
    8
    what is this?
    Code:
     }.bind(this));

    this is a method from prototype.js javascript framework. its ok

Posting Permissions

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




Click Here to Expand Forum to Full Width

HTML5 Development Center