broadvillage.com
   Main Page About Us Privacy Policy ToS Add Your Link Submit Article
Search:   
Add Url
 

Hotels & Travel

Academics & Education

Law & Politics

Health & Hygiene

Healthcare & Treatment

Entertainment

Home Family & Garden

Shopping Online

Events & News

Outdoor & Sports

Cooking & Drinking

Culture & Art

Jobs & Careers

Online & Indoor Games

Software & Networking

Business & Services

Realty & Property

Technology & Science

Fashion & Lifestyle

Children & Teens

Automobile & Automotive

Society & Communities

Self Healing

Finance & Investment


 

  Main Page –› Software & Networking –› Website Development
   
 

Use JavaScript to Dynamically Update Your Website

   

If you've been on the Internet for a while, you've probably seen numerous examples of JavaScript use. JavaScript is a powerful scripting language used to create special effects on your website, but did you know it can also be used as a very powerful web design tool?

Have you ever joined a new affiliate program or created a new publication that you wanted to add to your existing navigational set up, but dreaded having to manually add the links to every page on your site?

You can use JavaScript to enable you to dynamically update every page on your website with just one file. This technique is the same technology used by numerous syndication services on the Internet. It enables them to deliver dynamically updated content to every website in their program.

Before we begin, if you'd like to see an example of a navigational system that is dynamically displayed, visit http://www.web-source.net. This website has over one thousand pages and each and every one of them displays its navigational system using JavaScript. If I want to add an additional link, I simply update one file and every page on the site is automatically updated.

The first step in setting up your JavaScript feed is to create the file that will contain your content. To do this, open a text editor such as NotePad and simply copy and paste your existing navigational setup into a new page. There is no need to begin the page with , etc. as you are only creating the feed for one section of your existing web page which already has those tags.

Once you've created your new page containing your navigational HTML, you'll now need to add some additional JavaScript coding to each line of your HTML.

The first line of your new file will look like this: on the last line.

Here's how your code might look:

Each backslash (\) should be preceded with another backslash.

Example: \\

Each apostrophe (') should be preceded with a backslash.

Example: \'

You can include most HTML and JavaScript coding however, you cannot include JavaScript that must access another file to run.

After you've created your content and added the special JavaScript coding, you'll need to save your new file. Try to select a name that reflects your file such as navigate.js and make sure your filename is no longer than eight letters.

Next, you'll need to create a new directory on your server where you store your HTML files. Name this directory "content" (without the quotes) and upload your new .js file in ASCII.

Here's where the magic occurs... Place the following code in your HTML pages where you would like your navigate.js content to be displayed. Make sure you change the URL and direct it to your new .js file. The following code must be displayed exactly as it appears. Make sure there are no spaces after the first line of code.

< SCRIPT language="JavaScript" src="http://www.yourdomain.com/content/yourfile.js" > < /SCRIPT >

If you've followed the above steps correctly, your navigational system should now be displaying on your web page. If you are receiving a script error message, most of the time, it's due to an extra space at the end of a line or an extra or missing character. Make sure you go over your code very carefully. Once you've created your content feed and it is displaying your content, updating your file will be simple.

If you'd rather not have to code the JavaScript yourself, I use a great script called, Master Syndicator which will code your content for you. I highly recommend it.

Using JavaScript to display your navigational set up can not only enable you to instantly update the content on every page of your website, but can also save you hours of valuable time.

Author: Shelley Lowery
 
Author Bio:
Shelley Lowery is an expert in this field. Shelley has written several articles in the past on this topic.
This article can be searched using: web site development, web design & development, website development tampa
 
 
 

Related Articles

 
Promoting Podcasts - 3 Basic Tips
 
Cisco CCNA Candidate FAQ
 
Becoming an Infopreneur
 
How to Establish Your Credibility Online
 
2 Golden Rules for the Success of Subscription Websites
 
Having an Opt In List As an Affiliate Marketer Is Crucial
 
Cisco CCNA / CCNP Home Lab Tutorial: Configuring An Access Server
 
How To Create Free Ringtones
 
How To Drive Traffic To Your Website Using Funny Videos
 
All Refurbished Laptops Are Not Created Equal - Buyer Beware!
 
 
 
 

Audio CD Copiers

Special copiers are available for duplicating audio CD and can copy multiple CDs from a single origi ... - Kent Pinkerton
 

10 Cool Ways To Attract People To Your Web Site

Article shows 10 unique ways to attract people to your website - Debbie Gragg
 

Condoms for Your PC - Log Your PC Maintenance

You want safe sex - so track the results of your PC maintenance to protect your PC. - Tim Flynt
 
 

What is a Virtual Private Network?

A Virtual Private Network, or VPN, is a way of using the Internet to provide remote users with secur ... - James Hunt
 

How to Generate Traffic on a Zero Budget

If you don't have the big money to advertise on google adwords, or on sponsored links, don't worry, ... - Tariq Giaziri
 

Podcasting: How to Make a Video Podcast

Although Apple had nothing to do with the podcasting technology, the iPod and podcasting quickly bec ... - Philip Nicosia
 

The Basics of Starting an Online Business (Part 2)

There is much more to starting an online business than just having a product to sell and setting up ... - Jordi Shoman
 

Why Contextual Advertising Works, and will Work for Your Website

Why does contextual advertising work? You find yourself appreciating the subtle, and unobtrusive man ... - Sion Fletcher
 
 
Main Page Privacy Policy ToS
Copyright © 2008 www.broadvillage.com All Rights Reserved.