How do fix: "Wrong number of arguments" / "invalid propert assignment" / "Invalid argument"  
Author Message
Manish Pandit





PostPosted: 2006-10-16 4:32:00 Top

java-programmer, How do fix: "Wrong number of arguments" / "invalid propert assignment" / "Invalid argument" First off, they are not java errors - they are javascript errors.
Secondly, use Firefox and open up 'Tools->Javascript Console', which
will give you the line number in the javascript and even take you to
the javascript code which is causing the error when you double click
the error message.

-cheers,
Manish

 
VK





PostPosted: 2006-10-16 4:41:00 Top

java-programmer >> How do fix: "Wrong number of arguments" / "invalid propert assignment" / "Invalid argument" Java Guy wrote:
> I'm trying to view a web page. IE tells me there are (Java?) errors
> on the page.

You are executing JavaScript code, so you are getting JavaScript
errors, Java has nothing to do with it.

> Line: 15
> Char: 7
> Error: Wrong number of arguments or invalid propert assignment
> When it says "line 15" or "line 46" , is that really the 15'th and
> 46'th line of "liveview.html" ???

Yes, counting the first line from <html> tag and accounting all blank
lines (if any)

> What is "Char" referring to?

Abbreviation of "Character at position:", nothing to do with Char data
type (moreover JavaScript doesn't have such type).

Line 15 (by above counting rules) will be:
> else SQ.mdpc = 0;

As I don't see SQ declared anywhere, it is resolved to undefined, so
you are trying to assign new property to undefined value. Even
JavaScript doesn't tolerate such tortures ;-)

So what is SQ and where is it?

P.S. Is it new style in Java to omit block parenthesis?
if (condition) {
//do this
}
else {
//do that
}
looks so much more beautiful IMHO