www.webdeveloper.com
Results 1 to 4 of 4

Thread: Javascript navigation

  1. #1
    Join Date
    Dec 2012
    Location
    Tennessee
    Posts
    8

    Question Javascript navigation

    Is it a good choice?
    I currently use free hosting which does not support PHP so I cannot use includes.
    Would javascript be a sufficient alternative?

    This is a code I have used for navigation before but I would like professional opinions.

    Thanks guys.

    Code:
    var arrow ='<span>&raquo;&nbsp;</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>";  }     function writeLinks() {     document.getElementById('homelinks').innerHTML = home.join("");     document.getElementById('computerslinks').innerHTML = computers.join("");     } setTimeout(writeLinks,0);// Fires the function on page load without stopping other loads

  2. #2
    Join Date
    Mar 2011
    Posts
    1,136
    I didn't go through your code to see exactly what you're doing, but you can use JavaScript for navigation. But you do need to accommodate the small number of users who run with JavaScript disabled by posting some basic navigation links on every page.

    By the same token, hosting is dirt cheap these days. You can get a real site for the cost of the domain name and $3-6.00 per month that would include PHP support, mySQL databases, Email, etc.
    Rick Trethewey
    Rainbo Design

  3. #3
    Join Date
    Dec 2012
    Location
    Tennessee
    Posts
    8
    Quote Originally Posted by rtrethewey View Post
    I didn't go through your code to see exactly what you're doing, but you can use JavaScript for navigation. But you do need to accommodate the small number of users who run with JavaScript disabled by posting some basic navigation links on every page.

    By the same token, hosting is dirt cheap these days. You can get a real site for the cost of the domain name and $3-6.00 per month that would include PHP support, mySQL databases, Email, etc.
    I would provide basic links inside of my noscript tags.
    I just wanted to see if anyone thought it was useful if you do not have PHP capabilities.
    Really only thing stopping me from paying is bills.
    Bills are tight at the moment and my sites are more of a hobby not a priority.

    Do you have suggestions for hosting?
    All the ones I have checked want about $3 - $6 a month for X amount of months but want it all paid up front.
    I tried godaddy at one point but they were not what I was looking for.

  4. #4
    Join Date
    Aug 2012
    Location
    TX
    Posts
    293
    bluehost.com FTW

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles