Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8370473
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T13:55:13+00:00 2026-06-09T13:55:13+00:00

Possible Duplicate: “uncaught TypeError: Object is not a function” in JavaScript my full js

  • 0

Possible Duplicate:
“uncaught TypeError: Object is not a function” in JavaScript

my full js file is this:

function addInning() {
    alert("hello");
}

my html file has the element
<input name="addInning" type="button" value="Add Inning" id="addInning" onclick="addInning();">

and the code will not execute. for the life of me i cannot figure out why, as this is just about the simplest thing possible. the error from chrome is “Uncaught TypeError: object is not a function”. I searched on stackoverflow and the solutions posted have not been helpful. i feel like i’m losing my mind.

full code here: http://jsfiddle.net/BUsPC/

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T13:55:14+00:00Added an answer on June 9, 2026 at 1:55 pm

    Change the name and id from “addInning” to something else. This worked for me.

    <script type="text/javascript">
        function addInning()
        {
            alert("hello");
        }
    
    </script>
    <input name="addInning2" type="button" value="Add Inning" id="addInning2" onclick="addInning();">
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: “On file dialog cancel” event in JavaScript Is there a listener for
Possible Duplicate: setTimeout and “this” in JavaScript I am trying to put a timeout
Possible Duplicate: Weird “406 not acceptable” error I've been stuck on this ALL DAY!
Possible Duplicate: “Invalid use of 'this' in non-member function” in objective-c context? If I
Possible Duplicate: “Uncaught ReferenceError: JQueryValidatorUI is not defined”? Any familiar with jquery-validation-ui plugin for
Possible Duplicate: “this” inside object I'm trying to make an object literal for a
Possible Duplicate: Weird “406 not acceptable” error following code generate a 406 Not Acceptable
Possible Duplicate: PHP: “Notice: Undefined variable” and “Notice: Undefined index” This code shows warnings
Possible Duplicate: What does “(void) new” mean in C++? I'm not familiar with C++
Possible Duplicate: Creating an “object” of an interface I am new to Java. Based

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.