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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T14:28:05+00:00 2026-06-04T14:28:05+00:00

Please go to this page real quick and hit the login at the top

  • 0

Please go to this page real quick and hit the login at the top right:

Here’s the link: http://forums.gamesalad.com

I’m trying to pre-fill these two fields that pop up. They seem to be in some sort of frame. I am unable to access the fields using getElementByID (or any getElement for that matter). How can I access these two fields using javascript?

NOTE: (don’t worry about firing the javascript, just getting access to the fields).

Here’s my current code:

document.getElementById('login-dialog-email').value = 'the user name';
  • 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-04T14:28:08+00:00Added an answer on June 4, 2026 at 2:28 pm

    If you look at your HTML in a debugger, like the Chrome Debugger, you’ll see that you have two instances of the input elements with id=”login-dialog-email”.

    The W3C spec says that only one instance of an id attribute can be used in a single HTML document, and browser vendors implement this spec in a manner where the behavior is considered to be undefined if more than one id attribute of the same value is on the page.

    In my experience, this really only affects the second instance of the element with said id, and if you do a search for login-dialog-email and examine which element gets highlighted, you’ll see that the second instance is the one that represents your form.

    Remove the first instance, or use a unique id, and then you’ll be able to target the element.

    The first instance of this login field appears to be part of a template that is hidden on the page.

    <div id="login-form-template" style="display: none">
        <form accept-charset="UTF-8" action="https://auth.gamesalad.com/auth/signIn" class="dialog dialog-form" id="common-login-form" method="post">
       ...
    
        <li class="email">
            <label for="login-dialog-email">
            Email:
              <input id="login-dialog-email" name="emailAddress" type="text" value=""></input>
            </label>
        </li>
        <li class="password">
            <label for="login-dialog-password">
            Password:
              <input id="login-dialog-password" name="password" type="password" value="">
            </label>
        ...
    

    The second instance of this field actually appears inside the fancybox, which is where the actual HTML is located that you are trying to target.

    <div id="fancybox-content" style="border-top-width: 10px; border-right-width: 10px; border-bottom-width: 10px; border-left-width: 10px; width: 300px; height: 233px; "><div style="width:300px;height:auto;overflow: auto;position:relative;">
       <form accept-charset="UTF-8" action="https://auth.gamesalad.com/auth/signIn" class="dialog dialog-form" id="common-login-form" method="post">
       ...
       <li class="email">
           <label for="login-dialog-email">
             Email:
             <input id="login-dialog-email" name="emailAddress" type="text" value="">
           </label>
       </li>
       <li class="password">
         <label for="login-dialog-password">
           Password:
           <input id="login-dialog-password" name="password" type="password" value="">
         </label>
       <span>
    ...
    

    Thus, even if the site owner were trying to target these fields from the page, he/she would have the same problem.

    The solution to this problem is to use className attributes within any template. This ensures that all of the fields can be targeted via DOM methods.

    However, this doesn’t mean that you can’t still target the elements:

    JavaScript:

    document.getElementsByClassName("email")[2].
        getElementsByTagName("input")[0].value = "test@example.com";
    

    jQuery:

    The site is using jQuery, so you may also be able to use this:

    $('input[name="emailAddress"]').val( "test@example.com" );
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Please check this page: http://islandhideaway.weebly.com/ For whatever reason, the flash slideshow moves over 1
Please visit this link Click on first Image. Now is showing the Modal page
I want add my custom sidebar next right column all page. Please check this
Please see this IBM site - http://www.ibm.com/us/en/ If you see the site banners, there
Could somebody please help me implement this HTML with my PHP login Page? For
Please have a look at this page www.pixeli.ca/issue. I have begun making a page
Please have a look at this demo page that I cooked up a while
By real pagination i mean something like this when in page 3: <<Previous 1
here is a simple script I've tested: <?php require 'dbcon.php'; header(location:http://google.com); $time1 = time();
I'm a real newbie regarding mod_rewrite so please don't laugh. I am using this

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.