By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
448,590 Members | 1,190 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 448,590 IT Pros & Developers. It's quick & easy.

How do fix: "Wrong number of arguments" / "invalid propert assignment"/ "Invalid argument"

P: n/a
I'm trying to view a web page. IE tells me there are (Java?) errors
on the page. Here they are:

Line: 15
Char: 7
Error: Wrong number of arguments or invalid propert assignment
Code: 0
URL: http://(address.of.my.webcam):port/LiveView.html

and

Line: 46
Char: 3
Error: Invalid argument
Code: 0
URL: http://(address.of.my.webcam):port/LiveView.html
When it says "line 15" or "line 46" , is that really the 15'th and
46'th line of "liveview.html" ???

What is "Char" referring to?

Here is the contents of "LiveView.html"

-------------------------------------
<head>
<meta
http-equiv="Page-Enter"content="revealTrans(Duration=0.5,Transition =21)">
<script language="javascript1.2">
var video_on,audio_on,mdpc,aIPPort,self_port;
var self_address,url;

function setparameter()
{
video_on = "y";
audio_on = "n";
mdpc = "n";

if( mdpc == "y") SQ.mdpc = 1;
else SQ.mdpc = 0;

SQ.ShowText = 63;
SQ.width = 640;
SQ.height = 480;
SQ.account = "cdefg";
SQ.password = "cdefg";
SQ.cookies = "RootCookie00000";
SQ.webcamID = "=00150f00154d";

if( aIPPort.length 1 )
{
self_port = aIPPort[1];
SQ.port=self_port;
}
else
{
SQ.port = 8085;
}
SQ.IP =self_address;

if( audio_on == "y" ) SQ.audio_on = 1;
else SQ.audio_on = 0;

if( video_on == "y" ) SQ.video_on = 1;
else SQ.video_on = 0;
}
function reload()
{
if (SQ.width != SQ.img_width)
{
SQ.width = SQ.img_width;
SQ.height = SQ.img_height;
}
setTimeout("reload()",1000);
}
</script>
<link href="template.css" rel="stylesheet" type="text/css">
</head>
<body class=body>
<div align=center>
<table cellspacing=0 cellpadding=0 class=bsize>
<tr>
<td height="38" align=center valign=middle bgcolor=#408080>
<b><font color=#FFFFFF size=1>Camera Name:
<input type="text" name=WEBCAMNAME disabled class=ronly value=M_IP_C
size="20" >
&nbsp; &nbsp; <input type=button name=snapshot value=Snapshot onClick
= "SQ.snapshot();" class=pfont>
&nbsp; &nbsp;User Online:1</font>
</b>
</td>
</tr>
<tr>
<td bgcolor=#408080 valign=middle align=center>
<OBJECT id=SQ codeBase=/view.cab#Version=1,0,0,61 height=480 width=640
classid=CLSID:B0781EB7-16EA-49F1-9C1D-9716D88206CF></OBJECT>

<script language="javascript1.2">
url = location.host;
aIPPort = url.split(":");
self_address = aIPPort[0];
toString(self_address);
setTimeout("reload()",3000);
setparameter();

</script>
<form name= "ir_auto_det" method= "post" action= "ir_set.html">
<input disabled type=submit value=NightView class=pfont size="20">
</form>
</td>
</tr>
</table>
</div>
Oct 15 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
VK
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 <htmltag 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

Oct 15 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.