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 4574700
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T19:57:34+00:00 2026-05-21T19:57:34+00:00

The situation was as follows: I had this form in a .php file: <form

  • 0

The situation was as follows:

I had this form in a .php file:

<form action="/flash_card/scripts/create_user_gate.php"
            onsubmit="return validateForm()" method="post">
            <table align="center">
                <tr>
                    <td>Name</td>
                    <td><input type="text" name="name" id="uname"
                        onkeydown="return checkInput(event)"></td>
                </tr>
                <tr>
                    <td>Password</td>
                    <td><input type="password" name="password">
                </tr>
                <tr>
                    <td></td>
                    <td><button onclick="return validateForm()" type="button"
                            title="Create user!" name="submit">Create!</button>
                    </td>
                </tr>
            </table>
        </form>

With this just outside the body tag:

<script type="text/javascript" src="/flash_card/js/webscripts.js"></script>

This file contained:

/**
 * 
 */

function validateForm(){
    document.write("BURNED INTO YOUR MINDDDD");
    return false;
}

function onlyAlphaNumericAndModifiers(e) {
    var keynum;
    var keychar;
    var numcheck;

    if (window.event) // IE
    {
        keynum = e.keyCode;
    } else if (e.which) // Netscape/Firefox/Opera
    {
        keynum = e.which;
    }
    // letters, numbers, backspace, delete, arrow keys
    if (keynum >= 65 && keynum <= 90 || keynum >= 48 && keynum <= 57
            || keynum == 8 || keynum >= 37 && keynum <= 40 || keynum == 46) {
        return true;
    } else {
        return false;
    }
}

After fiddling around, I find that I cannot get my validateForm() to fire at all, so I separate it into its own file and suddenly on the click fires validateForm() properly and the text box’s onkeydown is firing checkInput correctly as well.

Where did I go wrong? I am assuming that a .js file can contain more than one function, so I must be missing something fundamental.

  • 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-05-21T19:57:34+00:00Added an answer on May 21, 2026 at 7:57 pm

    It seems like you may have an error in /flash_card/js/webscripts.js, can you post the source of this file?

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

Sidebar

Related Questions

Picture the following situation. I have an XML document as follows, <Form> <Control Type=Text
My situation is as follows: I have a script file ( somescript.js ) that
Our situation is as follows, but I'm curious about this problem in any situation.
The situation is as follows: I've got 2 models: 'Action' and 'User'. These models
The situation is as follows: I have a .txt file with results of several
I have a situation as follows <body> Test<br /> test<br /> test1<br /> </body>
My situation is as follows: I'm working on an implementation of BlackJack. I've got
Here is my situation, I have a string as follows 'a':1 'b':2 'c':3 I
Situation is simple: I post a plain HTML form with a textarea. Then, in
Situation: I often run into this problematic and never know how to solve it.

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.