Reply to Re: How do you use extenrnal javascript file if script different on each page?

Your name:

Reply:


Posted by BootNic on 04/12/06 19:40

> "xyZed" <xyzed@xyzed.co.uk> wrote:
> news:tqep32lg88evb897h1gj3n3jp3k9eomaqg@4ax.com....
>
> I want to use external javascript files. The only javascript I have
> is from affiliate links and many pages have different ads with
> different scripts. Is there anyway I can still use an external
> file? Or would I have to use several different ones? If so would
> this cause any problems?
>
> Would you be able to reference particular parts of javascript in a
> file containing dozens of affiliate scripts?

<script type="text/javascript">
page = window.location.href.match(/[^\/]*$/);
switch (true) {
case(page=='index.htm') :
document.write('This could be the index page.');
break;
case(page=='search.htm') :
document.write('What ya lookin for?')
break;
default:
document.write('I don\'t know where you are or how you got here!')
}
</script>

--
BootNic Wednesday, April 12, 2006 12:40 PM

People grow through experience if they meet life honestly and
courageously. This is how character is built.
*Eleanor Roosevelt*

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация