I have a javascript that displays the site contents and it is included
in every one of my pages. It has logic that makes it work a little
differently in the home page.
Currently I check the page title and if it the home page title I do one
thing otherwise I do another. I wanted to add a translator for the page
which changes the page title.
I would like to get away from using the page title as a check because
of this. I have tried placing a global variable in a separate script on
the home page and it works fine for the home page. The problem is that
it is undefined on the other pages.
Is there a way to check for the presence of a variable without giving
an error if not there? I don't want to define it on every page unless I
have to.
BTW: If I have a script like this: <script src="xxx"
type="text/javascript">some code</script>. Will "some code" be
processed before source code, after source code, or not at all. Is it
consistant on all browsers?
--
Dennis M. Marks
http://www.dcs-chico.com/~denmarks/
Replace domain.invalid with dcsi.net
-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 100,000 Newsgroups - 19 Different Servers! =-----