facebook

MyEclipse 9.0 (release) – Wrong JS validation

  1. MyEclipse Archived
  2.  > 
  3. Web 2.0 / AJAX
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #316350 Reply

    ronen malka
    Member

    MyEclipse 9.0 mark an error on the following js line:

    var selectedRow = selectedRows[j];

    which is part of the following 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:

    Syntax error on token “var”, delete this token

    code run perfect. no problem in MyEclipse 8.5

    #316385 Reply

    support-swapna
    Moderator

    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.

    #316420 Reply

    ronen malka
    Member

    Thanks.

    #316422 Reply

    support-swapna
    Moderator

    ronenmalka,

    Glad that you are all set.
    Do let us know if you have any other issues.

Viewing 4 posts - 1 through 4 (of 4 total)
Reply To: MyEclipse 9.0 (release) – Wrong JS validation

You must be logged in to post in the forum log in