Don’t understand why but this array function only works the first time arround. The idea is to send the array.join(’ ‘) with Ajax Get to server for pagination technique. uriencoded array.join(’ ') should be
- ‘art’
- ‘art’ ‘art’
- ‘art’ ‘art’ ‘art’
Not
- ‘art’
- ‘silver’ ‘art’
- ‘silvergold’ ‘silver’ ‘art’
Counter Function
function counter()
{
if(count.length==1)
{
return;
}
else if(count.length==2 && count[0]!==count[1])
{
count.shift();
alert(count.join(' '));//Demonstrate flaw
}
else if(count.length==3 && count[0]!==count[1])
{
count.shift();
alert(count.join(' '));
}
else if(count.length==3 && count[1]!==count[2])
{
count.shift();
count.shift();//should get rid of index 0 and 1, does first time?
alert(count.join(' '));
}
else if(count.length>3)
{
count.shift();//gaurenty max length of 3?
}
}
:xAny advice greatly appreciated.