MyEclipse: MyEclipse 9.0 (release) - Wrong JS validation

ronenmalka - Apr 28, 2011 - 12:28 PM
Post subject: MyEclipse 9.0 (release) - Wrong JS validation
MyEclipse 9.0 mark an error on the following js line:

Code:
var selectedRow = selectedRows[j];



which is part of the following code:

Code:

          for (var j in selectedRows)
          var selectedRow = selectedRows[j];
             if(selectedRow != null)
             {
             var val = selectedRow.cells[MIDindex].getAttribute("origValue");
             GroupActionCr = GroupActionCr + groupingCriteria[i] +"="+val+"&";
             }


Validation error is:

Quote:
Syntax error on token "var", delete this token


code run perfect. no problem in MyEclipse 8.5
support-swapna - Apr 29, 2011 - 06:41 AM
Post subject: RE: MyEclipse 9.0 (release) - Wrong JS validation
ronenmalka,

The error is due to the missing {} for "for". We have made the js validations more robust in the latest versions so you are seeing the error in ME 9.0.

Can you include the {} for the for statement :

for (var j in selectedRows) {
var selectedRow = selectedRows[j];
if(selectedRow != null)
{
var val = selectedRow.cells[MIDindex].getAttribute("origValue");
GroupActionCr = GroupActionCr + groupingCriteria[i] +"="+val+"&";
}
}

Let me know how this works for you.
ronenmalka - May 01, 2011 - 02:09 PM
Post subject: RE: MyEclipse 9.0 (release) - Wrong JS validation
Thanks.
support-swapna - May 02, 2011 - 06:02 AM
Post subject: RE: MyEclipse 9.0 (release) - Wrong JS validation
ronenmalka,

Glad that you are all set.
Do let us know if you have any other issues.
All times are GMT - 6 Hours
Powered by PNphpBB2 © 2003-2004 The PNphpBB Group
Credits