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

Discussion in 'Javascript' started by Java Guy, Oct 15, 2006.

  1. Java Guy

    Java Guy Guest

    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>
    Java Guy, Oct 15, 2006
    #1
    1. Advertising

  2. Java Guy

    VK Guest

    Re: 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
    VK, Oct 15, 2006
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.

Share This Page