In my project I have a form with 3 input fields with ajax functionality applied to them.

The three input fields are registering country, city and date. The country and city field have autocomplete functionality applied to them, and the date field have a ajax calender applied to it.

My question now is: Is it normal to have the javascript code for the autocomplete and calendar in three seperate files, or should you try to put it into one file? If you put it into one file I guess you'll have to make a menu system.

I'm just thinking that you might need a date calendar in other html-files, and it would be unnecessary to include the code for a bunch of other things.

Right?