Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Javascript (http://www.velocityreviews.com/forums/f68-javascript.html)
-   -   'object doesn't support this property or method' (http://www.velocityreviews.com/forums/t927763-object-doesnt-support-this-property-or-method.html)

punjab_tom@hotmail.com 10-25-2006 12:27 PM

'object doesn't support this property or method'
 
hello

i have a problem when it comes to running my intranet site.. it gives
msgbox in internet explorer saying 'object doesn't support this
property or method' and line 260.. I identified line 260 below...

I dont know javascript very well; but I would really appreciate some
help with this.

I believe that this is handling keystrokes- and it does let me press
CTRL + N; but it's just a little bit confusing..

I didn't CHANGE this code; it's just frustrating because the website
throws an error and now it wont do anything else.

also.. is there something similiar to 'on error resume next' for the
javascript world?
thanks





function SetChangedFromInput(bFlag)
{
var k = window.event.keyCode;
var arKodes;//Codes of valid keys
var bReturn = true;
arKodes =
Array(8,32,46,106,107,109,110,111,186,187,188,189, 190,191,192,219,220,221,222);
if ((k >= 65 && k <= 90) ||
(k >= 48 && k <= 57) ||
(k >= 96 && k <= 105))
{
bReturn = false;
}
for (var i in arKodes)
{
if (k == arKodes[i])
bReturn = false
}

//Handled Ctrl-N pressing
if ((k == 110 || k == 78) && event.ctrlKey == true)
LINE260-> return;

if (!bReturn)
{
SetChanged(bFlag);
}
return window.event;

}


GLC 10-25-2006 03:54 PM

Re: 'object doesn't support this property or method'
 

punjab_tom@hotmail.com wrote:
> hello
>
> i have a problem when it comes to running my intranet site.. it gives
> msgbox in internet explorer saying 'object doesn't support this
> property or method' and line 260.. I identified line 260 below...
>


IE does not report line numbers correctly and is usually one line off.
Though, I have seen it be further off, and I can't remember if it is
one more or one less.

>
> also.. is there something similiar to 'on error resume next' for the
> javascript world?
> thanks


Javascript does have exception handling.
Look up try and catch.

>
> //Handled Ctrl-N pressing
> if ((k == 110 || k == 78) && event.ctrlKey == true)
> LINE260-> return;
>


try{
if ((k == 110 || k == 78) && event.ctrlKey == true)
return;
}
catch(e){
alert("An error occured!");
}



All times are GMT. The time now is 05:53 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.