You are here: Re: How do you use extenrnal javascript file if script different on each page? « HTML « IT news, forums, messages
Re: How do you use extenrnal javascript file if script different on each page?

Posted by xyZed on 04/14/06 13:59

There is circumstantial evidence that on Wed, 12 Apr 2006 16:40:08
GMT, "BootNic" <Bootnic@bounce.prodigy.net> wrote
_______________________________________________________

>› <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>

Thanks (and thanks Andy too) I at least know it's possible now, even
though I don't really understand the javascript :-)

--

Free washing machine help and advice.

www.washerhelp.co.uk

www.xyzed.co.uk/newsgroups/top-posting.html

 

Navigation:

[Reply to this 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

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