'object doesn't support this property or method'

Discussion in 'Javascript' started by punjab_tom@hotmail.com, Oct 25, 2006.

  1. Guest

    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)
    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, 2006
    #1
    1. Advertising

  2. GLC Guest

    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!");
    }
     
    GLC, Oct 25, 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.
Similar Threads
  1. todd
    Replies:
    3
    Views:
    5,820
  2. Roman
    Replies:
    0
    Views:
    4,035
    Roman
    Jan 4, 2004
  3. zdrakec
    Replies:
    0
    Views:
    573
    zdrakec
    Sep 26, 2007
  4. Joe
    Replies:
    3
    Views:
    555
  5. JohnE
    Replies:
    1
    Views:
    1,051
    JohnE
    Mar 9, 2010
Loading...

Share This Page