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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T04:57:00+00:00 2026-05-20T04:57:00+00:00

This javascript works fine.it does what I want it to do. it puts a

  • 0

This javascript works fine.it does what I want it to do. it puts a boarder around a table etc. but I am still getting an error in the firefox console saying that addressTable, AddressSpan AddressShort… are null or not defined. everything seems to be working but the error at the bottom of the screen is annoying I don’t want to see it there

Error

document.getElementById(“addressTable”)
is null [Break On This Error]
document.getElementById(“addressTable”).style.borderStyle=”solid”;

Script

<script language="javascript" type="text/javascript">
var isDroppedDown= 0 ;
function dropDown(){
        var myTable = document.getElementById("bgImgBlue");
        var sideImage = document.getElementById("sideImage");


        parent.document.getElementById('frameMain').rows = '173,*';
        isDroppedDown = 1;
        myTable.height = 100;
        sideImage.height = 100;
        document.getElementById("bgImgBlue").style.backgroundImage="url('images/i_frame_bgnavBig.gif')";
        document.getElementById("sideImage").height = 172;
        document.getElementById("addressTable").style.borderStyle="solid";
        document.getElementById("addressTable").style.borderWidth="1px";
        document.getElementById("addressSpan").style.paddingTop="";
        document.getElementById("addressShort").style.visibility = 'hidden';
        document.getElementById("ContactSpanFull").style.paddingTop="";
        document.getElementById("ContactSpan").style.paddingTop="";
        document.getElementById("ContactSpan").style.visibility = 'hidden'
        document.getElementById("contactTable").style.borderStyle="solid";
        document.getElementById("contactTable").style.borderWidth="1px";
 }

 function dropDownUp(){
        var myTable = document.getElementById("bgImgBlue");
        var sideImage = document.getElementById("sideImage");

        parent.document.getElementById('frameMain').rows = '84,*';
        isDroppedDown = 0;
        myTable.height = 84;
        sideImage.height = 160;
        document.getElementById("bgImgBlue").style.backgroundImage="url('images/i_frame_bgnav.gif')";
        document.getElementById("bgImgBlue").style.backgroundImage="url('images/i_frame_bgnav.gif')";
        document.getElementById("sideImage").height = 79;
        document.getElementById("addressTable").style.borderStyle="";
        document.getElementById("addressTable").style.borderWidth="";
        document.getElementById("addressSpan").style.paddingTop="30px";
        document.getElementById("addressShort").style.visibility = 'visible';
        document.getElementById("ContactSpan").style.visibility = 'visible'
        document.getElementById("ContactSpanFull").style.paddingTop="30px";
        document.getElementById("contactTable").style.borderWidth="0px";
 }

function dropdownResize(){

    if(isDroppedDown == 0){     
        dropDown();
    }
    else{
        dropDownUp();
        }
}


</script>
  • 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-20T04:57:01+00:00Added an answer on May 20, 2026 at 4:57 am

    This javascript might be executing before the DOM is ready – that is – before the page has finished loading the HTML.

    If that’s the case it won’t find any of the getElementById items.. however, if you’re only getting the error on those elements, the likely explanation is that they haven’t been placed in the DOM at the time of execution.

    Or they don’t exist

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

Sidebar

Related Questions

I am building a Sudoku game for fun, written in Javascript. Everything works fine,
This question has been asked before, see: jQuery select only tr/td in main table,
learning Jquery and integrating with PHP - getting there, but have one last challenge
Consider this simple example; <?php $text = test; ?> <script type=text/javascript defer=defer> var test;
I've got an asp.net page that has c# code-behind that does some stuff in
In JavaScript if I append a child which has an ID to another place
I have an extremely simple example trying to use Data Annotations with unobtrusive javascript
I seem to be unable to change the onmouseover attribute of a div using
We have an ASP.NET web application which uses ASP.NET Ajax. We open it from
I have the set focus for a property which I am trying to use

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.