Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

JS sintax error

Status
Not open for further replies.

gunio6

Programmer
Joined
Jun 13, 2006
Messages
7
Location
AT
hi,

does anyone see a syntax error in the following code:

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) Assets.select(d);
}.bind(this));
}
}

i dont but the IE finds an error there!

can anyone help?
 
Perhaps this line?

Code:
throw $break;

What is $break? Where is it defined? If it's a variable, I suggest not starting it with a $ symbol to see if that fixes things.

Hope this helps,
Dan

Coedit Limited - Delivering standards compliant, accessible web solutions

[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
Hi, thanks for the reply!

$break is part of prototype.js javascript framework.
if i take it away it doesnt work as well : (

the error is in last line
}.bind(this));

} expected.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top