www.webdeveloper.com
Results 1 to 4 of 4

Thread: Looking for function in wrong file?

  1. #1
    Join Date
    Feb 2009
    Posts
    12

    Looking for function in wrong file?

    Hi,
    I have two javascript files, one called live_validation to check the input on forms and another called versions to do some other stuff.

    I'm trying to call a function from the versions file, but I keep getting an error from the other one.


    Statement on line 89: Cannot convert undefined or null to Object
    Backtrace:
    Line 89 of linked script http://mysite/javascripts/live_validation.js: In function DisplayResult
    sh.innerHTML = liveSearchReq.responseText;

    If I comment out the link to the validation script, my other script functions just fine. Can anyone suggest anything to try?

    Thanks.

  2. #2
    Join Date
    Nov 2003
    Location
    Worthington, OH, USA
    Posts
    3,634
    You either need to eliminate or rename one of the functions, if you don't the last occurrence encountered in the file will be the "live" function.
    54 68 65 42 65 61 72 4D 61 79

  3. #3
    Join Date
    Feb 2009
    Posts
    12
    Rename? Sorry, I forgot to mention the names. They are already different, the function in the live_validation file is called val_request and the function in the versions file is called compare_versions.

  4. #4
    Join Date
    Nov 2003
    Location
    Worthington, OH, USA
    Posts
    3,634
    Functions don't fire by themselves so you have something calling the wrong function. Suggest a search looking for the "wrong" name, and replacing it with the "right" one.
    54 68 65 42 65 61 72 4D 61 79

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles