Search
Recommended Sites
Related Links






   

Informative Articles

Are You Content With Your Content?
Following are Five Immediate Changes You Can Make to Drive Traffic and Sales Through the Roof 1. Put More Oomph in Your Articles. Don't tell the reader what he "could" do; tell him what he MUST do! Which of these sounds more dynamic to...

Autoresponders With PHP
First off, check out the URL below. You'll learn how to make that today. http://www.jumpx.com utorials/3/signup.html Fill out your e-mail address on the page you see. (I promise it's not being saved anywhere.) Then, wait a minute or two and check...

Flash makes your site heavy - Why and Where to use it ?
|||||||||||||||||||||| FLASH |||||||||||||||||||||||| Some Web designers thinks flash should not be used in their websites. REASONS: * Page takes more time to load * Visitor need to wait, until its loaded * Not Search engine friendly *...

The Top 3 Mistakes That Can Ruin Your Website's Search Engine Rankings- and How to Fix Them!
Getting your website up and running is hard enough. After spending hours getting the HTML code just right and trying to make sure that you provide a great user experience, the last thing you want to do is change everything around in order to get...

yoocan.com private property sales and lettings online - new website
http://www.yoocan.com enables people to sell, buy, rent or let their, house, home, flat or property privately online saving thousands on agent fees. Using a SQL Server 2000 database this site is ready to cope with huge volumes of data without...

 
Using External JavaScript Files

When you have lots of JavaScript functions and you plan to use
them on many web pages, it is always advisable to keep them in a
separate file, and then include that file on every page where
those functions are required. This way, you can better organize
them, you don't have to copy/paste the code again and again
(imagine if it runs to 100 or more lines!!), and you'll be forced
to write more generalized code for better integration and
scalability.

Besides, enclosing the common JavaScript routines in external
files keeps your web pages uncluttered and search engine spiders
and crawlers are able to reach the important content easily. They
don't have to shuffle through tens of lines of scripts.

In the first edition [that appeared in my newsletter - BYTESWORTH
REACHOUT] of my article I had omitted the process of creating the
external JavaScript files, but when one of my readers asked me
how to do it, I had to re-write the article.

It's very simple. Use any text editor of your liking (if you
hand-code your HTML, you can use the same editor that you use for
your HTML editing). Write the required code, and save the file
with .js (dot js) extension.

I'm going to give you a small example.

Suppose your JavaScript file is "myjfuncs.js".

and it has a function to return the bigger number of the two
supplied as parameters (you can simply start with the function,
no need to write

So when we use one of its functions in a JavaScript:



In this way, we can use all the complex functions contained in
the myjfuncs.js file.

About the Author
Amrit Hallan is a freelance web designer. For all web site
development and web promotion needs, you can get in touch with
him at amrit@bytesworth.com or http://www.bytesworth.com. For
more such articles, visit http://www.bytesworth.com/articles You
can subscribe to his newsletter [BYTESWORTH REACHOUT] on Web
Designing Tips & Tricks by sending a blank email at
bytesworth-subscribe@topica.com