Jump to content

Javascript Navigation


Recommended Posts

Is javascript navigation effective and smart?
In one of my old web pages I used javascript for navigation.

The code is listed below.
I have knowledge of PHP includes.

Currently I do not have web hosting which allows PHP(bills are tight so I opted for temporary free hosting).

Would my below code be a good temporary fix until I can pay for hosting and use PHP includes?
Are there any other methods?
I appreciate all the help and/or ideas.

var arrow = '<span>» </span>';
var clearance = 0;

home = new Array();
  home[1]= "<span class='asep'>Welcome</span>";
  home[2]="<a href='#'>"+arrow+"Home</a>";
  home[4]="<a href='http://safepiercing.org/en/piercing/body-aftercare' target='_blank'>"+arrow+"Piercing Aftercare [APP]</a>";
  home[5]="<a href='#'>"+arrow+"Contact Us</a>";

computers = new Array();
  computers[0]="<span class='asep'>Body Jewelry</span>";
  if(clearance == 1) {
  computers[1]="<a href='#'>"+arrow+"Clearance</a>";
  computers[2]="<a href='#'>"+arrow+"New Arrivals</a>";
  computers[3]="<a href='#'>"+arrow+"On Sale</a>";
  computers[4]="<a href='#'>"+arrow+"Dermal Anchors</a>";
  computers[5]="<a href='#'>"+arrow+"Barbells & Tongue Rings</a>";
  computers[6]="<a href='#'>"+arrow+"Navel Rings</a>";
  computers[7]="<a href='#'>"+arrow+"Non-Piercing Jewelry</a>";
  computers[8]="<a href='#'>"+arrow+"Curved & Eyebrow Rings</a>";
  computers[9]="<a href='#'>"+arrow+"Labret & Monroe Rings</a>";
  computers[10]="<a href='#'>"+arrow+"Nipple Rings</a>";
  computers[11]="<a href='#'>"+arrow+"Horse Shoes</a>";
  computers[12]="<a href='#'>"+arrow+"Plugs & Tunnels</a>";
  computers[13]="<a href='#'>"+arrow+"Guaged Tapers</a>";
  computers[14]="<a href='#'>"+arrow+"Captive Bead Rings(CBR)</a>";
  computers[15]="<a href='#'>"+arrow+"Twists & Hoops</a>";
  computers[16]="<a href='#'>"+arrow+"Nose Rings</a>";
  computers[17]="<a href='#'>"+arrow+"Retainers</a>";
  computers[18]="<a href='#'>"+arrow+"Body Jewelry Parts</a>";
  computers[19]="<a href='#'>"+arrow+"Skin Divers</a>";
  computers[20]="<a href='#'>"+arrow+"Cartilage & Tragus</a>";
  computers[21]="<a href='#'>"+arrow+"Fake Plugs & Tapers</a>";
  computers[22]="<a href='#'>"+arrow+"316L Stainless Steel</a>";
  computers[23]="<a href='#'>"+arrow+"Surgical Steel</a>";
  computers[24]="<a href='#'>"+arrow+"Titanium Body Jewelry</a>";
  computers[25]="<a href='#'>"+arrow+"Acrylic Body Jewelry</a>";
  computers[26]="<a href='#'>"+arrow+"Organic Body Jewelry</a>";
  computers[27]="<a href='#'>"+arrow+"Bio-Flex/PTFE</a>";
control = new Array();
  control[1]="<span class='asep'>User Controls</span>";
  control[2]="<a href='#' onclick='window.print(); return false'>"+arrow+"Print This Page</a>";
  control[3]="<a href='#' onclick='addbookmark(location.href,document.title);'>"+arrow+"Bookmark Us</a>";
  if(navigator.appName == "Microsoft Internet Explorer") {
  control[4]="<a href='#' onclick='setHomepage(\"http://google.com\");'>"+arrow+"Set As Homepage</a>";
   function writeLinks() {
     document.getElementById('homelinks').innerHTML = home.join("");
     document.getElementById('computerslinks').innerHTML = computers.join("");
     document.getElementById('usercontrol').innerHTML = control.join("");
setTimeout(writeLinks, 0); // Fires the function on page load without stopping other loads
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.