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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T05:56:50+00:00 2026-05-26T05:56:50+00:00

I have a form that I’m trying to get information from the user when

  • 0

I have a form that I’m trying to get information from the user when a button is pressed. I’m using a javascript function to pass the values to my script. This works great in Chrome and IE9 but for some reason Firefox sees the input elements as undefined. Here’s the HTML:

<div id="leftDiv">
<br>
<dl class="loginForm">
    <dt><label for="usernameField">Username:</label></dt>
    <dd><input type="text" id="usernameField" name="usernameField" value=""/></dd>
    <dt><label for="passwordField">Password:</label></dt>
    <dd><input type="password" id="passwordField" name="passwordField" value="" /></dd>
    <dt><label for="remember">Save info:</label></dt>
    <dd><input type="checkbox" id="remember" name="remember"/></dd>
    <dt><button type="button" onclick="javascript:tryLogin(usernameField.value, passwordField.value, remember.checked)"> Login</button> </dt><dd></dl>
</div>

I’ve ran the site through the W3c Online Validation and it passes so I don’t think that’s a problem.

  • 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-26T05:56:51+00:00Added an answer on May 26, 2026 at 5:56 am

    You need to make sure the all the inputs are wrapped in a <form> element to use the following code javascript:tryLogin(usernameField.value, passwordField.value, remember.checked)

    OR

    You could reference using document.getElementById() such as:

     javascript:tryLogin(document.getElementById('usernameField').value, document.getElementById('passwordField').value, document.getElementById('remember').checked)`
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Have a form that is not being read by serialize() function. <script type=text/javascript> function
I have a form that emails information and am trying to add another person
I currently have form that checks if a user has unsubmitted changes when they
We have a form that allows a user to filter a list with by
I have form object that I set to request in GET request handler in
I have form data that I insert into a database when the user clicks
I have a form that has a field pulled from the database as a
I have a form that once you select from a drop-down list and select
I have a form that is using jQuery Validate plugin for client side validation,
I have a form that i am trying to submit after the page loads

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.