MyEclipse Forums
This thread has been locked & this forum has been archived.
Please post new topics to General Development
View previous topic Printable version Log in to check your private messages View next topic
Author Message
ronenmalka
Post subject: MyEclipse 9.0 (release) - Wrong JS validation  PostPosted: Apr 28, 2011 - 12:28 PM



Joined: Apr 17, 2005
Posts: 41

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
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
support-swapna
Post subject: RE: MyEclipse 9.0 (release) - Wrong JS validation  PostPosted: Apr 29, 2011 - 06:41 AM



Joined: Nov 11, 2010
Posts: 2491

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.

_________________
Swapna
MyEclipse Support
 
 View user's profile Send private message  
Reply with quote Back to top
ronenmalka
Post subject: RE: MyEclipse 9.0 (release) - Wrong JS validation  PostPosted: May 01, 2011 - 02:09 PM



Joined: Apr 17, 2005
Posts: 41

Thanks.
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
support-swapna
Post subject: RE: MyEclipse 9.0 (release) - Wrong JS validation  PostPosted: May 02, 2011 - 06:02 AM



Joined: Nov 11, 2010
Posts: 2491

ronenmalka,

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

_________________
Swapna
MyEclipse Support
 
 View user's profile Send private message  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT - 6 Hours
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.
View previous topic Printable version Log in to check your private messages View next topic
Powered by PNphpBB2 © 2003-2004 The PNphpBB Group
Credits