Announcement

Collapse
No announcement yet.

Delay JavaScript execution

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • smsmasters
    replied
    I'm not very good with js, can someone please kindly try to modify it please?

    Thanks

    Leave a comment:


  • Wayne Luke
    replied
    Toss the code on the Onload event. Onload doesn't run until the entire page has loaded.

    Leave a comment:


  • smsmasters
    replied
    EDIT: didn't work so well

    Any other ideas please?
    Last edited by smsmasters; Wed 23rd May '07, 6:25am.

    Leave a comment:


  • smsmasters
    replied
    Hi, thanks. I tried that code but it made my browser freeze as if it was stalling whilst executing the js.

    Is there a way to make the js code run independently from the rest of the website being loaded?

    Thank you

    Leave a comment:


  • jasonlitka
    replied
    Javascript will be retrieved by the client where ever the tag is placed in your code. If the processing is what is slowing things down then you can try modifying the beginning of your tag to look like the code block below. You should not, however, use this if the JavaScript changes the layout of your page (by adding an image, etc.) as it can have odd effects...

    Code:
    <script language='javascript' defer='defer' ...

    Leave a comment:


  • smsmasters
    started a topic Delay JavaScript execution

    Delay JavaScript execution

    Code:
     
    <script language='javascript' src='http://v11.mivainline.eu.miva.com/MivaLine/GetHighlightContext.aspx?pid=------REMOVED----'></script>
    That is the miva inline ad code I use on my forum, but I found that it slows down the loading of my pages a little bit.

    I placed it in the footer but I want it to load at the very end when the whole forum has loaded.

    Thanks
    Last edited by smsmasters; Tue 22nd May '07, 5:44pm.
widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
Working...
X