i cant get two java scripts to work on one page?? can u please help?

Question by Hendrick: i cant get two java scripts to work on one page?? can u please help?



Hendrick Boards



Best answer:

Answer by Acestuff
No-one is going to really know what the problem is from what you’ve said. Alll you’ve done is said something about 2 “java scripts” and pasted a load of HTML code. For a start, your code does not have 2 java scripts – it embeds 4 external javascript files (note the difference between “java” and “javascript” because they’re completely different!)

What is wrong with them? Do they not do what you expect? What happens?

General pointers:
– Ensure all variables are encapsulated (ie not global) as this may cause problems between scripts used together.
– Load CSS in the head before you load any JS
– Load JS only when required (probably not in the head). This gives the appearance that pages load faster
– Ensure that your javascript files are not addressing things in the body because if they are they won’t be able to do anything because you’ve loaded them in the head!

Give your answer to this question below!

Revisions

There are no revisions for this post.

Tags: , , , , , ,

No comments yet.

Leave a Reply