So I have this huge code that I’m using in a Make Model Year Drop down at my site: [url]http://autodiyonline.com/
I was wondering first of all how can move the code from the html document into a .js and use the import function, and second how can I condense the code so that it doesn’t take up so much space.
If you look at the source of my page you can see there are 2 scripts used for the drops downs…
<script language=”javascript” type=”text/javascript”>
function dropdownlist(listindex)
{
…
}
and
<script language=”javascript” type=”text/javascript”>
function dropdownlistsub(listindex)
{
…
}
I would like to know if I can combine these into 1 .js file and import it to the page. Sorry that I am asking these noob questions but I don’t deal much with JavaScript so I really have no clue what I’m doing. I was lucky enough to modify the original JavaScript file in order to get my Drop down lists working.