Results 1 to 5 of 5

Thread: Uncaught reference error

  1. #1
    Join Date
    Feb 2014

    Exclamation Uncaught reference error

    hie everyone.. I m new to javascript .. I am not able to understand why is it giving meSpeak object undefined..
    I have the fragment of html file index.html as shown.
    <!DOCTYPE html>
    <html lang="en">
    <title>meSpeak.js: Text-to-Speech on the Web</title>
    // This demo is licensed under the GNU GPL.
    <script type="text/javascript" src="/static_files/js/mespeak/mespeak.js"></script>
    <script type="text/javascript ">
    ..... ....
    meSpeak.js has meSpeak defined.. still it is giving undefined error.. can anyone help me out..

  2. #2
    Join Date
    Oct 2012
    Undefined is usually a value of:

    1. variables that are not initialized
    2. property of an object that doesn't exist
    3. value of a function that doesn't actually return a value
    4. value of a function parameter for which no argument is supplied

    Since you didn't post any JavaScript code it's hard to tell what's your problem... Maybe you should try to check path to your script file (src attribute).

  3. #3
    Quote Originally Posted by ayesha.aj View Post
    meSpeak.js has meSpeak defined.. still it is giving undefined error.. can anyone help me out..
    Please make sure it is meSpeak.js or mespeak.js

  4. #4
    Join Date
    Mar 2007
    You browser has a console for JavaScript errors, it will tell you what line the error was detected in and the module, try using it to narrow down and zoom in on the problem, then post here the section of code, preferably a good chunk and indicate what line the error is on and wrap your code in forum tags to make life easier than seeing a wall of text...
    --> JavaScript Frameworks like JQuery, Angular, Node <--
    ... and please remember to wrap code with forum BBCode tags:-

    [CODE]...[/CODE] [HTML]...[/HTML] [PHP]...[/PHP]

    If you can't think outside the box, you will be trapped forever with no escape...

  5. #5
    Join Date
    Feb 2014
    Thank you .. My js file was not loading thats why the error was there.. I changed the location of js and wrote that path. It worked.

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