User Name Password Register
DaniWeb IT Discussion Community
All
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 330,339 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 2,721 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: 324 | Replies: 2 | Solved
Reply
Join Date: May 2008
Location: Sri Lanka
Posts: 3
Reputation: sampathw is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
sampathw's Avatar
sampathw sampathw is offline Offline
Newbie Poster

Dalying Javascript code execution order

  #1  
8 Days Ago
Hello,

I'm developing a web theme. Before the last div tag(Which simply has an image), I have added a java script which is calling a remote server for an image output. the last div tag image doesn't get loaded until the javascript execution completes. Please let me know a way to change this order ( load the javascript after the last image is loaded) as the whole design looks bad due to this problem.

Thanks in advance
Last edited by sampathw : 8 Days Ago at 8:30 am.
Sampath

Admin - best-internet-guide.com
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Jun 2006
Location: India
Posts: 6,611
Reputation: ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold ~s.o.s~ is a splendid one to behold 
Rep Power: 21
Solved Threads: 297
Moderator
Featured Poster
~s.o.s~'s Avatar
~s.o.s~ ~s.o.s~ is offline Offline
Rebellion Revamped

Re: Dalying Javascript code execution order

  #2  
5 Days Ago
Place the block of Javascript code *after* the DIV tag and things should work out fine. It problems still persist, consider attaching a listener to the onload event handler of the window object which would execute the required Javascript only after the entire page has loaded.
"I don't accept change. I don't deserve to live."

"Working a real job is a win if you're lazy, greedy, or unmotivated. If you're average, you fit right in. And if you're above average, the basic terms of employment and premise of the arrangement is against your interests."
Reply With Quote  
Join Date: May 2008
Location: Sri Lanka
Posts: 3
Reputation: sampathw is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
sampathw's Avatar
sampathw sampathw is offline Offline
Newbie Poster

Re: Dalying Javascript code execution order

  #3  
4 Days Ago
Hello,
Thank you very much for your advice. It works. thanks a lot!
Sampath

Admin - best-internet-guide.com
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb Marketplace (Sponsored Links)
Thread Tools Display Modes

Other Threads in the JavaScript / DHTML / AJAX Forum

All times are GMT -4. The time now is 9:17 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC