This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Product Version = NetBeans IDE 7.3 (Build 201302132200) Operating System = Linux version 3.2.0-41-generic running on i386 Java; VM; Vendor = 1.6.0_27 Runtime = OpenJDK Client VM 20.0-b12 Showing following Error to JavaScript code Expected an operand but found error function GetURLParameter(sParam) { var sPageURL = window.location.search.substring(1); var sURLVariables = sPageURL.split('&'); for (var i = 0; i < sURLVariables.length; i++) { var sParameterName = sURLVariables[i].split('='); if (sParameterName[0] == sParam) { return sParameterName[1]; } } }
Created attachment 134343 [details] IDE log
Error is shown at last line of this function, after I have one comment and 2 global variable declared
Reproducible in trunk, you can "fix" it by removing last character after "}" (closing function). I think there is already similar issue but I cannot find it...
Easy workaround, maybe nashorn related? I don't think this is P2
@Vladimir Riha I can't remove this brace as it indicate end of function. There might be some other error.
Created attachment 134352 [details] screenshot Not the brace, when I copied the code above, I had "whitespace" after the closing "}", so in IDE, it looked like on the screenshot. Once I deleted this "whitespace" (I think it is not really whitespace), it was OK Please check the screenshot to see what I mean. Perhaps I misunderstood the problem
Created attachment 134353 [details] 134352: screenshot Please attached Image of Error, I do not have any extra white space after braces.
If the whitespace/non-printable is not in the original source, try to delete the closing "}" and type it again
@rajivpingale Is the problem in js file or an html file? If in the html file, could you please attach it?
Please reopen the issue, if you have still the problem in current dev build. In such case, please attach the reproducible file. Thanks a lot.