What is wrong with this script? It gives me an error! Any help is great!
[code=html] arr = new Array(
{keywords:”volkswagen, car, pimp my ride”,description:”<a href=’car.html’>Volkswagen Pimp My Ride</a>”},
{keywords:”badger, snake, funny, song”,description:”<a href=’badger.html’>Badger Badger Badger</a>”},
{keywords:”microsoft, msipod, ms, msft, mico, soft, funny”,description:”<a href=’ipod.html’>Micosoft iPod</a>”},
{keywords:”llama, funny, duck”,description:”<a href=’llama.html’>The Llama Song</a>”},
{keywords:”mentos, diet coke, reaction, mdc”,description:”<a href=’mdc.html’>The Mentos and Diet Coke Reaction</a>”},
{keywords:”breeze, around, privates, clean, muggle, pants”,description:”<a href=’mp.html’>Muggle Pants</a>”},
{keywords:”old, car, skateboard, horn, lady, people”,description:”<a href=’old.html’>The Power of Old People</a>”},
{keywords:”old, funny, do, for, people”,description:”<a href=’old_fun.html’>What Old People Do For Fun</a>”},
{keywords:”pie, hole, whole, fart, mouth, funny”,description:”<a href=’pie.html’>Pie Hole</a>”},
{keywords:”power tool, race, funny, tools”,description:”<a href=’power.html’>Power Tool Race</a>”},
{keywords:”spore, nintendo, wii, game, cool”,description:”<a href=’spore.html’>Spore For Nintendo Wii</a>”},
{keywords:”taters, mashed, potatoes, funny, wierd, weird”,description:”<a href=’taters.html’>Mashed Taters</a>”},
{keywords:”wii, nintendo, game, xbox, gamecube, gameboy, spore”,description:”<a href=’wii.html’>Nintendo Wii aka revolution</a>”},
{keywords:”cute, cat, puppies, dog, kitty, funny”,description:”<a href=’cat.html’>Puppies vs Cat</a>”},
{keywords:”simpsons, funny, the, homer, underwear, tv, july, 2007, 27″,description:”<a href=’simpsons.html’>The Simpsons Real vs cartoon</a>”},
{keywords:”funny, numa, dance, fat guy, cool”,description:”<a href=’numa.html’>The Numa Numa Dance</a>”},
{keywords:”pokemon, kids, metro, train, station, funny, lol”,description:”<a href=’poke.html’>Kid Sings Pokemon Theme</a>”},
{keywords:”funny, motorcycle, cool, ouch”,description:”<a href=’motor.html’>Motorcycle Ouchie</a>”},
{keywords:”car, SUV, rims, picture, funny, cool”,description:”<a href=’rim.html’>Picture Rims</a>”},
{keywords:”simpsons, homer, matt, superman”,description:”<a href=’simpmovie.html’>The Simpsons Movie</a>”},
{keywords:”type, alphabet, letters, seconds, keyboard”,description:”<a href=’type.html’>Fast Typing</a>”}
)
function hi(keyword){
var desc = “”;
for(var i = 0; i < arr.length; i++){
var keywords = arr[i].keywords.split(“,”);
for(var j = 0; j < keywords.length; j++){
if(keywords[j].indexOf(keyword) > -1)
desc += arr[i].description + “<br>”;
}
}
document.getElementById(“description”).innerHTML = desc;
}
if(keywords[j].indexOf(keyword) > -1)
P.S. Don’t ask about the beginning of the script. Go to [url]www.davidlemcoe.com