Forum Moderators: coopster & phranque

Message Too Old, No Replies

How to Defer a Script?

         

Free_Man

10:02 pm on Mar 6, 2002 (gmt 0)

10+ Year Member



Hey All,

How on earth do you go about defering a script...

I have a little poll that is from an external link coming in via a script that takes FOREVER to load...So I want to defer the display of the script until the rest of the page loads...

Any ideas?

Brett_Tabke

11:05 pm on Mar 6, 2002 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



A little more explaination is order. What type of script? Perl, php?

Free_Man

11:12 pm on Mar 6, 2002 (gmt 0)

10+ Year Member



The script is javascript...

Free_Man

11:24 pm on Mar 6, 2002 (gmt 0)

10+ Year Member



And it is going offsite to pull it down...thus the lag as their site is pinging at 100ms.

volatilegx

11:25 pm on Mar 6, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



call the script at the end of the page and use document.write along with style definitions to locate the output where you want it on the page.

Free_Man

11:37 pm on Mar 6, 2002 (gmt 0)

10+ Year Member



Okay...

Could you give me a little pointer on calling the script at end of the page and the html commands?

Here is the current code:

<script language="JavaScript" src="http://www.surveyitup.com/survey/view.js?acctid=25">
</script>

I really appreciate the ideas!