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

  • SEARCH
  • Home
  • 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 8069805
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T13:10:46+00:00 2026-06-05T13:10:46+00:00

I keep getting this error saying that it cannot find my javascript function checkpw().

  • 0

I keep getting this error saying that it cannot find my javascript function checkpw(). It’s being called by onfocus.

<script type="text/javascript" >

function checkpw() { 

alert ("working");

}



</script>
</head>
<body>

<h2>Welcome to our webpage.</h2>

<p>{{ reginfo}}</p>
<form action="/validate/" method ="get" >
<p>Username</p>
<input type="text" name="username"  class="textbox"> </input > </br>
<p>Password</p>
<input class="textbox" name="password" id="password" type="text"> </input > </br>
<p>Confirm Password</p>
<input class="textbox" id="checkpw" type="text" onfocus="checkpw()"> </input > </br>
<p>Email<p>
<input class="textbox" name="email" type="text"> </input > </br>

<input type="submit" class="button" value="Submit"> 



</form>

</body>

I’m probably making a really stupid mistake but i’m new to javascript so anything that helps would be great. thanks.

  • 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-05T13:10:48+00:00Added an answer on June 5, 2026 at 1:10 pm

    change: function checkpw() to: function checkPw()
    and: focus="checkpw()" to: focus="checkPw()"


    Edit:
    It is not a reserved word; however the name is already polluted in the global namespace. As Domenic and jimr pointed out, the id attribute is using the same name, thus causing a conflicting condition.

    The solution is still to change either:
    (1) the id value of the input element
    -or-
    (2) the function name (as I stated above)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I can't find any info on this... I keep getting some error saying I
I keep getting this error when I try to call Find() public void findTxt(string
i keep getting this error for an array of errors that i have set
I keep getting an error saying that a specific column, doesn't exist for b.BookCode
Keep getting this error after inserting a subdatasheet into a query and trying to
I keep getting this error System.Web.HttpException was unhandled by user code Message=Validation of viewstate
I keep getting this error when I try to commit a group of executed
I keep getting this error all over the place where I only have jquery
I keep getting this error whenever I call gethostbyname() in my C code. ==7983==
I keep getting this error, although the file still gets moved into the correct

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.