469,645 Members | 1,137 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,645 developers. It's quick & easy.

'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;

}

Oct 25 '06 #1
1 2328
GLC

pu********@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!");
}

Oct 25 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.