WHO WOT ME
We love the random - videos, images, games and much much more visit us @ www.whowotme.com
getElementById returns null
Hi,
Suppose I have the following inside a function:
The above works. However, when I define it like the following it says display_content is null on firefox error console.
Any suggestions? when I replace display_content with document.getElementById('display_content'), it works.
Suppose I have the following inside a function:
JavaScript Code:
document.getElementById('display_content').innerHTML = "hello";
The above works. However, when I define it like the following it says display_content is null on firefox error console.
JavaScript Code:
var display_content = document.getElementById('display_content');function render(){display_content.innerHTML = "hello";}
Any suggestions? when I replace display_content with document.getElementById('display_content'), it works.
Related Articles
Featured Video Clip
Comments
Be the first to leave a comment!
About the Author
Celebrity Spotlight
Top Entertainment Articles
|
Best of Paparazzi Girls
Here are the girls largely responsible for keeping the paparazzi machine humming.
|
|
Zimbio Caption Contest: Enter and Win $25 at Amazon.com!
This is possibly the easiest photo to caption. It practically writes itself.
|
|
Amber Rose Goes Topless in Miami, Children Unfazed
Uh, are there topless beaches in Miami that allow children?
|
Popular Entertainment Zines





