SOC Help

jasgor9

New Member
Messages
40
Reaction score
0
Points
0
I have ads that i want to load last on a page (after the content) with source-ordered-content:

<script name="myAd" language="text/javascript" src=""></script>

and at the end of the page, i put

<script language="JavaScript">
document.all.myAd.src="http://www.x10hosting.com/adserve.js?corporate";
</script>

but then the ads just move to the bottom of the page. How can i force them to load last without using IFrames?

(i dont want to use iframes because they have a border in IE and they aren't transparent.)
 

rockee

New Member
Messages
120
Reaction score
0
Points
0
Perhaps this article contains the answer to your problem.

Sorry, I can't provide the link to the original article because it was on a competitor's page of X10 Hosting.

Browsers load your HTML from top to bottom too. However, you can use JavaScript to control this. I guess there must be several ways working around. This is my idea, it should work.

Let's say you have some HTML code like this:

<html>
<body>
<img src="images/banner.jpg">
Some text here
</body>
</html>

and you want your banner, in this case, loaded last. Then you could do something like this.

<html>
<body>
<img id="banner" src="images/blank.jpg">
Some text here
<script language="javascript">
document.getElementById("banner").src = "images/banner.jpg";
</script>
</body>
</html>

To do with div/span/table you could do as following:

<html>
<body>
<img src="images/banner.jpg">
<span id="somethingloadlast"></span>
Some text here
<script language="javascript">
document.getElementById("somethingloadlast").innerHTML = "Hello my <b>friend</b>, I am loaded after all";
</script>
</body>
</html>

You can do similar thing for div or table using innerHTML property. You can substitute anything with new HTML code with this technique. Remember to put your script code at very end of your page (just before </body> tab).

I will leave it up to you to interpret what the article suggest to suit your particular needs.

At the very least it will give you some ideas and possibly a starting point.

Regards,
Rocky
 
Last edited:
Top