•
•
•
•
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 375,170 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,189 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: 1367 | Replies: 3
![]() |
•
•
Join Date: Feb 2002
Location: Lawn Guylen, NY
Posts: 10,873
Reputation:
Rep Power: 32
Solved Threads: 108
Is there ANY method to delay the loading of 3rd party javascript advertisements until the rest of the page has finished loading? When my ad server gets sluggish, it delays the output of my site, which is killer.
And yes, I already know about using position:absolute to place the JS code at the bottom of the page and absolutely position the ad where I want it. Unfortunately that's really hard to do with my layout, however.
And yes, I already know about using position:absolute to place the JS code at the bottom of the page and absolutely position the ad where I want it. Unfortunately that's really hard to do with my layout, however.
Dani the Computer Science Gal
Do you run a computer-related website? Feature it in our niche link directory!
Do you run a computer-related website? Feature it in our niche link directory!
•
•
Join Date: Feb 2002
Location: Lawn Guylen, NY
Posts: 10,873
Reputation:
Rep Power: 32
Solved Threads: 108
Thanks. Unfortunately, this only works for script files inside <head>. I've actually just succumbed to the pressure and did a whole bunch of fancy absolute positioning tricks. So we'll see how it goes
Dani the Computer Science Gal
Do you run a computer-related website? Feature it in our niche link directory!
Do you run a computer-related website? Feature it in our niche link directory!
•
•
•
•
Thanks. Unfortunately, this only works for script files inside <head>. I've actually just succumbed to the pressure and did a whole bunch of fancy absolute positioning tricks. So we'll see how it goes
Here is a quick test with the scipt in the body. If you remove defer from the script tag and run the html, you will get a script error.
<html>
<head>
<style>#TestDefer{display:none;}</style>
</head>
<body>
<script language="javascript" type="text/javascript" defer>
alert(document.getElementById('TestDefer').innerHTML);
</script>
<div id=TestDefer >
This Text should display in the alert if defer is present in the script.
</div>
</body>
</html>
Last edited by Sailor_Jerry : Aug 27th, 2006 at 2:34 pm.
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
•
•
•
•
DaniWeb JavaScript / DHTML / AJAX Marketplace
- Long time to post/reply to threads (DaniWeb Community Feedback)
- New Daniweb site layout (DaniWeb Community Feedback)
- XML Menu Help - Delaying modules? (Existing Scripts)
- Frameset,Showing loading..Please wait message (ASP.NET)
Other Threads in the JavaScript / DHTML / AJAX Forum
- Previous Thread: Simple AJAX with xml
- Next Thread: javascript validation



Linear Mode