Portal Home > Knowledgebase > Articles Database > document.getElementById("loading") has no properties


document.getElementById("loading") has no properties




Posted by latheesan, 12-01-2007, 01:29 AM
I was writing a javascript file to get Ajax on my site. I added a small adjustment so that everytime a ajax is initiated, the div with id "loading" will become visible, but when a php file is processed and passed to the content div, this loading div will become hidden. this is how i tried to code it: ajax.js index.php When i run this, i get the following error on my FireFox Error Console: This ajax was working fine, until i added 2 lines to get the loading working. Can someone help me fix this error please?

Posted by WebHostingNeeds, 12-01-2007, 06:53 AM
Do you have working copy of these file available online ? (id) - you need to put real id of HTML element here.

Posted by Barti1987, 12-01-2007, 07:43 AM
style.visibility should be style.display Peace,

Posted by AnS_, 12-01-2007, 10:26 AM
Your refering to the object before it's creation. You can move the function call below the div: Or simply use the method onload="" on your page BODY element That will call your function only when the body is fully loaded:

Posted by HostSentry, 12-01-2007, 02:50 PM
You need to add that style in the tag. You are asking to change something you never made.
... or use hidden if you want it hidden by default.

Posted by Codebird, 12-05-2007, 02:08 PM
try changing the name from loading to another name it always happens, and it is true it is not visibility but display



Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read
[problem] http problem (Views: 839)
High I/O Wait (Views: 773)
Control Database query (Views: 803)
php vs. python (Views: 781)


Language:

LoadingRetrieving latest tweet...

Back to Top Copyright © 2018 DC International LLC. - All Rights Reserved.