+ Reply to Thread
Results 1 to 5 of 5

Thread: [Urgent] OMG!! This is hitting my head!! Please help!!!

  1. #1
    lair360 is offline x10 Sophmore lair360 is an unknown quantity at this point
    Join Date
    Dec 2008
    Posts
    200

    Exclamation [Urgent] OMG!! This is hitting my head!! Please help!!!

    Hi everyone! I am creating this script and its driving me crazy!!!!
    I don't know if this JavaScript will load all of my JScript first and let the page load second....

    Could you please check if its correct?????

    Thank you!

    ----------------------------
    Code:
    <script  language="Javascript" type="text/javascript">
    <!-- hide from non JavaScript Browsers
    
    if (!window.addScript)
    {
        window.addScript = function (src, callback) {
            var head = document.getElementsByTagName("head")[0];
            var script = document.createElement("script");
            script.src = src;
            script.type = "text/javascript";
            head.appendChild(script);
            if (typeof callback == "function") callback();
        };
    }
    
    window.addOnLoad(function () {
        window.addScript("image_preload.js");
        window.addScript("http://pub.oxado.com/insert_ad?pub=220440");
        }
    );
    // -->
    </script>
    Please look and see if its correct....

    Also, for those who correct any mistake will recieve 200 points!
    The winner will be allowed to use this code for their website!

  2. #2
    xav0989's Avatar
    xav0989 is offline Community Public Relation xav0989 is just really nice
    Join Date
    Jul 2008
    Location
    ifk
    Posts
    4,438

    Re: [Urgent] OMG!! This is hitting my head!! Please help!!!

    The best and simplest way to include the JS that you want is to directly include it:
    Code:
    <script  language="Javascript" type="text/javascript" src="image_preload.js"></script>
    <script  language="Javascript" type="text/javascript" src="http://pub.oxado.com/insert_ad?pub=220440"></script>
    Xavier L | Community Public Relations Manager (Free Hosting Support)
    █ Yes, my position is too cool to even exist!
    How am I helping? Rate this post by clicking the icon below! (this is even better than "liking" a post)
    Terms of Service | Acceptable Use Policy | x10Hosting Wiki

  3. #3
    lair360 is offline x10 Sophmore lair360 is an unknown quantity at this point
    Join Date
    Dec 2008
    Posts
    200

    Re: [Urgent] OMG!! This is hitting my head!! Please help!!!

    Quote Originally Posted by xav0989 View Post
    The best and simplest way to include the JS that you want is to directly include it:
    Code:
    <script  language="Javascript" type="text/javascript" src="image_preload.js"></script>
    <script  language="Javascript" type="text/javascript" src="http://pub.oxado.com/insert_ad?pub=220440"></script>
    I would like to use my type so that it could cache the JScript faster (dynamically).

  4. #4
    xav0989's Avatar
    xav0989 is offline Community Public Relation xav0989 is just really nice
    Join Date
    Jul 2008
    Location
    ifk
    Posts
    4,438

    Re: [Urgent] OMG!! This is hitting my head!! Please help!!!

    Well I don't seem to see any problem with your script. Could you give me an url...
    Xavier L | Community Public Relations Manager (Free Hosting Support)
    █ Yes, my position is too cool to even exist!
    How am I helping? Rate this post by clicking the icon below! (this is even better than "liking" a post)
    Terms of Service | Acceptable Use Policy | x10Hosting Wiki

  5. #5
    lair360 is offline x10 Sophmore lair360 is an unknown quantity at this point
    Join Date
    Dec 2008
    Posts
    200

    Re: [Urgent] OMG!! This is hitting my head!! Please help!!!

    I've inserted it into my hompage, please click clear your internet caches first and click on my Signature....

    Tell me how fast it loads...
    Edit:
    Is this part correct???

    Code:
    window.addOnLoad(function () {
        window.addScript("image_preload.js");
        window.addScript("http://pub.oxado.com/insert_ad?pub=220440");
        }
    );
    // -->
    </script>
    Last edited by lair360; 02-14-2009 at 12:52 PM. Reason: Automerged Doublepost

+ Reply to Thread

Similar Threads

  1. Play Line Rider? Line Rider Head Quarters is for you!
    By StingReay in forum Link Exchange
    Replies: 0
    Last Post: 07-07-2008, 08:11 AM
  2. advice on getting a girl outta ur head
    By warlordste in forum Off Topic
    Replies: 18
    Last Post: 03-12-2008, 09:56 AM
  3. Link heading&drop down box to the head?
    By fl gal in forum Graphics & Webdesign
    Replies: 0
    Last Post: 03-05-2008, 12:08 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers