Advanced Search

Results 1 to 3 of 3

Thread: Javascript stopped working after combination

  1. #1
    Join Date
    Mar 2012
    Posts
    53
    Thanks
    7
    Thanked 0 Times in 0 Posts

    Default Javascript stopped working after combination

    Hi,
    Well I had lots of scripts so what I did is that I combined all of them into one script file, which contains files like Jquery library too.
    But now the problem is that it has stopped working, I don't know why did this happen.

    What I did is that I took every script copied and pasted it and then I gave some space under it by pressing enter a few times and then I used to paste other script, I was told this was the method to combine scripts but now the scripts don't work.
    Here is the link to combined scripts http://files.cryoffalcon.com/bloghut...NCOMPRESSED.js

    And the link to a live example is http://bloghutsbeta.blogspot.com/

  2. #2
    Join Date
    May 2012
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    When you got too many things on startup either one cancells out the other or all codes stop working.

  3. #3
    Join Date
    Apr 2012
    Location
    Chester, Cheshire
    Posts
    329
    Thanks
    7
    Thanked 35 Times in 35 Posts

    Default

    I think you will find this thread (http://www.dynamicdrive.com/forums/s...ad.php?t=41961) useful in understanding why bundling a load of different scripts together, ad hoc, may cause some unforseen errors.

    Keep in mind the order in which the script file is read and which scripts need to supercede others.

    Creating an overall init() function may solve your problem, if you're willing to sit and read through each script and work out which needs to be executed when.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •