View Full Version : Javascript: Call js function from different document?

2006-07-27, 20:20
I want to stat using ajax, and rather than put all my functions in one js script, I want to separate them and load them differently.

<script type="text/javascript" src="./inc/js/ajax.js"></script>
<script type="text/javascript" src="./inc/js/main.js"></script>

Now in my mian.js I want to call a function of my ajax script that I load. But it doesn't seem to work that way, is there anyway to get that to work?

2006-07-28, 05:14
Someone could have posted and told me that I'm wrong and you can, that it was most likely just some messed up javascript somewhere in my document that stopped it from running.

Thanks a lot guys. ;)