dcsimg
consective function calls creating problem
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Haroon_Ahmad
Posted On:   Thursday, August 24, 2006 08:31 AM

hi please see the following code, for (var i=0; i f[i].value = res[i+1]; checkHistory(res[i+1]) //alert (res[i+1]) spn[i].innerHTML = res[i+1]; } this loop runs four times for four keywords and the checkHistory() reads PHP session array and searches if any keyword is already present in the SESSION. If present then it reads its relative suggestion from the mySQL DB and displays it. now the problem is that if the visitor has seen suggestion for fourth keyword that is the last keyword of the loop then it displays the suggestion in the DIV properly but if the user has seen suggestion for any keyword except fourth that is   More>>

hi

please see the following code,

			


for (var i=0; i
f[i].value = res[i+1];
checkHistory(res[i+1])
//alert (res[i+1])
spn[i].innerHTML = res[i+1];
}




this loop runs four times for four keywords and the checkHistory() reads PHP session array and searches if any keyword is already present in the SESSION. If present then it reads its relative suggestion from the mySQL DB and displays it.

now the problem is that if the visitor has seen suggestion for fourth keyword that is the last keyword of the loop then it displays the suggestion in the DIV properly but if the user has seen suggestion for any keyword except fourth that is the last one then it doesnt show it.

if i comment ALERT it does not show it, BUT if i un-comment ALERT it does display it. I am lost that what it has to do with ALERT.. can you shed some light on this please?

thanks    <<Less
About | Sitemap | Contact