...

View Full Version : Javascript stopped working after combination



cryoffalcon
05-21-2012, 02:53 PM
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/bloghuts/uncompressed/BlogHuts%20UNCOMPRESSED.js

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

Philip M
05-21-2012, 03:23 PM
Your link crashes my browser. :(

Best solution - do it again, making sure that your .js file does not contain any HTML tags <script type = "text/javascript"></script>



It is your responsibility to die() if necessary….. - PHP Manual

cryoffalcon
05-21-2012, 03:38 PM
Your link crashes my browser. :(

Best solution - do it again, making sure that your .js file does not contain any HTML tags <script type = "text/javascript"></script>



It is your responsibility to die() if necessary….. - PHP Manual

Which link crashes the browser as provided two and I have copied the files two times before coming here to forum but still facing this problem. Is it a bad idea to add Jquery library with other files combined? And how can I find an error if something is not closed as its Javascript and I am not good at it Just basic knowledge.

Philip M
05-21-2012, 05:49 PM
Which link crashes the browser as provided two and I have copied the files two times before coming here to forum but still facing this problem. Is it a bad idea to add Jquery library with other files combined? And how can I find an error if something is not closed as its Javascript and I am not good at it Just basic knowledge.

http://bloghutsbeta.blogspot.com/
Line: 5
Error: 'Array' is undefined

Cannot escape from this continuous error without restarting browser. I am using IE9.

I don't plan to open your .js file on security grounds. Better safe than sorry!

It is OK to use jQuery with plain vanilla Javascript files, but not to use two different Javascript frameworks, such as jQuery and Mootools or Prototype.

I think you will find that you have not copied the files correctly or in full, perhaps missing out a closing brace } which comes at the end of a script but with several blank lines before it. Try copying them one at a time and testing the result before proceding.

cryoffalcon
05-21-2012, 07:18 PM
http://bloghutsbeta.blogspot.com/
Line: 5
Error: 'Array' is undefined

Cannot escape from this continuous error without restarting browser. I am using IE9.

I don't plan to open your .js file on security grounds. Better safe than sorry!

It is OK to use jQuery with plain vanilla Javascript files, but not to use two different Javascript frameworks, such as jQuery and Mootools or Prototype.

I think you will find that you have not copied the files correctly or in full, perhaps missing out a closing brace } which comes at the end of a script but with several blank lines before it. Try copying them one at a time and testing the result before proceding.

Well I found out what is the reason for the error it is because when I was using combined version I was combining Jquery 1.7 while when they were separate it was 1.5, so when I used 1.5 in combined too, it resolved the Issue now I don't understand why is the new Jquery creating issues?



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum