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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T14:19:18+00:00 2026-06-16T14:19:18+00:00

I am very new to Javascript. I have been looking into using Javascript to

  • 0

I am very new to Javascript. I have been looking into using Javascript to edit css style properties. I have searched the web and looked at a lot of different problems. Even with all of that, it is probably my inexperience as to why I can’t figure out what is wrong with my code. What adds to the problem is that there are so many ways to do this. Anyway here are the specifics.

What I want it to do:
When someone clicks on the link in the code, I want the hidden DIV (which will just be near the top of my waiting to be called on) to have its visibility switched to visible so as to create a new layer on the page.

My code:

<html>
    <head>
        <script language="javascript">
            function newwindow() {
                var showme = document.getelementbyid("testing");
                showme.style.visibility = "visible";
            }
        </script>
    </head>
    <body>
        <a href="#" onclick="newwindow()">Show me my hidden layer</a>
        <div id="testing" style="position: absolute; visibility: hidden; left: 50%; top: 50%;
    border: 1px solid darkblue; width: 400px; height: 300px; line-height: 300px;     
    text-align: center; vertical-align: middle;
    margin-top: -150px; margin-left: -200px; background: lightgray">HELLO!!!</div>
    </body>
</html>

Now, I know there are a lot of ways to do this. But can someone show me what to tweak in the code I gave to make the way I am writing this work? Thanks so much for your time.

  • 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-16T14:19:19+00:00Added an answer on June 16, 2026 at 2:19 pm

    It is document.getElementById not document.getelementbyid

    Working Demo

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

Sidebar

Related Questions

I am very new to javascript and have been using the JQuery library quite
I am very new to Web development, and have been writing some javascript that
I am very new to javascript and ajax/jquery and have been working on trying
I'm very new to javascript and have been playing around with regular expressions. I'm
Hi I am very new to javascript. i have been given the task to
I have this Javascript code I inherited from another developer. I am very new
I am new to javascript so sorry I don't know very much. I have
I have been developing a new JavaScript application which is rapidly growing in size.
I'm very new to Javascript and JQuery, I've been trying different ways to pull
I'm implementing Stoyan Stefanov's javascript namespace function as I have been reading his very

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.