#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2003
    Location
    Austria
    Posts
    1
    Rep Power
    0

    Problems with reading .JS file


    Hi guys!

    I have problem with loading external .JS file.

    The file is loaded sometimes and sometimes not. P.e after refreshing the site the script sometimes works.

    1st part:

    <SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">

    var SCT_TICKER_FONT_COLOR="#000000";
    var SCT_TICKER_BG_COLOR="#FF0000";
    var SCT_TICKER_LINK_COLOR="#FFFF00";
    var SCT_TICKER_VLINK_COLOR="#FFFF99";
    var SCT_TICKER_HOVER_COLOR="#000000";
    var SCT_TICKER_FONT="Arial";
    var SCT_TICKER_RESSORT="";

    var SCT_TICKER_HOVER_UNDERLINE="underline";
    var SCT_TICKER_LINK_UNDERLINE="none";
    var SCT_TICKER_FONTBOLD="bold";
    var SCT_TICKER_WIDTH=650;
    var SCT_TICKER_HEIGHT=20;
    var SCT_TICKER_FONT_SIZE=9;
    var SCT_TICKER_SPEED=8;
    var SCT_TICKER_HOVER_STOP=1;
    var SCT_TICKER_TRANSPARENT=0;
    var SCT_TICKER_OFFSET=325;
    </script>

    2nd part

    <SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript" SRC="http://www.sportal.de/de/content/js/dlcticker.js"> </script>



    What should I do in order to display it always.

    Regards,
    Goran1999
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2003
    Posts
    138
    Rep Power
    12
    This question is in the wrong area it should have been posted to
    Clientside: HTML javascript etc.

    If you include the javascript from a file you must not use the <script> and </script> tags. Just remove them from the .js file!
    --

    ngibsonau
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2003
    Posts
    1
    Rep Power
    0

    .js not loading fast enough


    Hello,

    I am having the same problem.. I am trying to load an external .js file in the <script> tag, and then trying to call a function inside it using "onload" in the Body tag..

    Apparently the script doesnt load quickly enough for the "onload" function to be able to call it! How do I fix this? Should I make some sort of delay script?

    Thanks,

    Edwardo
  6. #4
  7. kill 9, $$;
    Devshed Supreme Being (6500+ posts)

    Join Date
    Sep 2001
    Location
    Shanghai, An tSín
    Posts
    6,898
    Rep Power
    3887
    As ngibsonau said, this should be posted to the HTML/Javascript/CSS forum.
    ~ishnid

IMN logo majestic logo threadwatch logo seochat tools logo