Thank you for being a valued part of the CNET community. As of December 1, 2020, the forums are in read-only format. In early 2021, CNET Forums will no longer be available. We are grateful for the participation and advice you have provided to one another over the years.

Thanks,

CNET Support

Question

multiple javascripts per page

Mar 27, 2012 10:21PM PDT

individually i know the js works but when i put them on the same page ...
they use external .js files and on page files. any ideas?

Discussion is locked

- Collapse -
Answer
Re: multiple javascripts per page
Mar 27, 2012 10:43PM PDT

There is no reason why it wouldn't work. Why do you fear so?

Kees

- Collapse -
(NT) because it does not work i am looking at it right now
Mar 27, 2012 11:23PM PDT
- Collapse -
Re: scripts
Mar 27, 2012 11:28PM PDT

Just have a look in the source of this page (the page you're reading now) and count how many javascripts it has. You'll be amazed.

Kees

- Collapse -
ok
Mar 28, 2012 12:39AM PDT

yes i know, so why would mine not work? it seems like it should. they work individually. the thought there is that i must have variables or functions of the same name but i could not find any.

- Collapse -
If they don't work
Mar 30, 2012 2:43AM PDT

there will be an error on the page. In Internet Explorer you can check to see what the error is and in Firefox you can use the Web Developer toolbar to debug.

~Sovereign