My knowledge of JavaScript is not great, and I've discovered that I can't put some things in those .JS files. But I'm gradually feeling my way and am working out ways of incorporating affiliate links into them. Would be great if I could add search boxes to those .JS files, but the codes provided by affiliate programs are not in pure Javascript.
One thing: is it possible to add a drop-down menu to a .JS file?
I've tried the following, which works normally, but not via a .JS call:
<FORM NAME="nav"><SELECT NAME="SelectURL" onChange="window.open (document.nav.SelectURL.options[document.nav.SelectURL.selectedIndex].value,'newwindow')">
<OPTION VALUE="http://www.freefind.cjb.net"SELECTED>
Please select site to visit:
<OPTION VALUE="http://CDUK.Best.CD">
CD UK - Discount Music
<OPTION VALUE="http://Nutrel.cjb.net">
Nutrel - Health
<OPTION VALUE="http://TopSitesUK.cjb.net">
UK Top - Best of British
</SELECT></FORM>
Spent ages trying to work this one out. Been scouring all the JS sites, but no luck.
Anything in JS files which are called must be JavaScript, that is, it will be placed within the <script> and </script> tags when called. So you will have to document.write() any HTML tags.
Look like you want to include the same code on several pages. I would use Server Side Includes (SSI) if your server supports them.
Bookmarks