Click here to Skip to main content
Rate this: bad
Please Sign up or sign in to vote.
See more: Javascript
I have downloaded a sample web project to use fingerprint authentication in is the link ),but there is some syntax error(as shown by VS) in the following javascript statement-
        function objReader::On_Captured(reader, captureResult) 
where objReader is the id of an object tag. Please help i am unable to understand this line.
Actually i dont understant what is use of '::' here
Posted 13-Feb-13 22:05pm
Edited 13-Feb-13 22:07pm
Richard MacCutchan at 14-Feb-13 5:10am
What is the name of the file that contains this code and what is the error you receive?
Himu from Orissa at 14-Feb-13 5:28am
Visual studio says....Expected '('
Himu from Orissa at 14-Feb-13 5:29am
this code is written in the same page inside script tag

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

The '::' is not valid in a JavaScript identifier, so the parser is reading "objReader" and expects it to be followed by "(" - the beginning of a JS parameter list.
I'd expect '::' in C++ code, not JavaScript. This code is valid in neither.
Maybe there is something else in the project that should process this to produce valid JS code? In which case Visual Studio may be unaware of that processing but it may run anyway. This seems unlikely.
Himu from Orissa at 15-Feb-13 1:00am
i think this function is written as an event of the object tag, but there is some syntactic error
Rob Grainger at 15-Feb-13 7:04am
If I get time I'll download and have a look at the weekend.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Advertise | Privacy | Mobile
Web04 | 2.8.150302.1 | Last Updated 14 Feb 2013
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100