•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the JavaScript / DHTML / AJAX section within the Web Development category of DaniWeb, a massive community of 455,974 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,754 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JavaScript / DHTML / AJAX advertiser: Lunarpages Web Hosting
Views: 4114 | Replies: 13 | Solved
![]() |
•
•
Join Date: Nov 2007
Location: Romania, Constanta
Posts: 8
Reputation:
Rep Power: 0
Solved Threads: 0
The problem seems to be that you can execute the JavaScript code only after all the html document is ready (that means markup, content text and fully loaded images).
If you can wait until saturday/sunday I'll have a look over your problem and suggest the best action.
p.s.: sorry for the long time, but work is keeping me busy.
If you can wait until saturday/sunday I'll have a look over your problem and suggest the best action.
p.s.: sorry for the long time, but work is keeping me busy.
Standard Blue.
•
•
Join Date: Jan 2008
Posts: 5
Reputation:
Rep Power: 0
Solved Threads: 0
•
•
•
•
The problem seems to be that you can execute the JavaScript code only after all the html document is ready (that means markup, content text and fully loaded images).
If you can wait until saturday/sunday I'll have a look over your problem and suggest the best action.
p.s.: sorry for the long time, but work is keeping me busy.
Thanks, you're much appreciated! I still haven't found a solution.
Last edited by badda : Feb 2nd, 2008 at 11:36 am.
•
•
Join Date: Nov 2007
Location: Romania, Constanta
Posts: 8
Reputation:
Rep Power: 0
Solved Threads: 0
There are two solutions you can try: the first one is to call your JavaScript code at the end of the html body tag
This way, when the web engine parses the document it will have most of the DOM ready for the JavaScript code.
Another option will be to use the DOMContentLoaded event which basically does the same thing, but it's supported only by Mozilla.
p.s.: The window.onload() gives full control to JavaScript when all the html document has been processed (including tags/ scripts / images / etc. )
p.p.s.: I've tried to look back over your example test page, but couldn't find it.
<body> [all HTML] <script type="text/javascript" src="myscript.js"></script> </body> </html> // at the end of myscript.js initialiseFunction();
This way, when the web engine parses the document it will have most of the DOM ready for the JavaScript code.
Another option will be to use the DOMContentLoaded event which basically does the same thing, but it's supported only by Mozilla.
p.s.: The window.onload() gives full control to JavaScript when all the html document has been processed (including tags/ scripts / images / etc. )
p.p.s.: I've tried to look back over your example test page, but couldn't find it.
Standard Blue.
•
•
Join Date: Jan 2008
Posts: 5
Reputation:
Rep Power: 0
Solved Threads: 0
I'm not sure if the onload event can help me in any way.
Had to move the example page: Here's the new URL:
http://sitexplorer.redio.de/test/
Had to move the example page: Here's the new URL:
http://sitexplorer.redio.de/test/
![]() |
•
•
•
•
•
•
•
•
DaniWeb JavaScript / DHTML / AJAX Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
- Previous Thread: $('idname') means what?
- Next Thread: Position and Load an image when Clicked


Linear Mode