开发者

ajax mysql query acting weird

开发者 https://www.devze.com 2023-02-06 14:23 出处:网络
please go to lookaroundyou.net; scroll to the bottom of the page and try to navigate videos through page numbers

please go to lookaroundyou.net; scroll to the bottom of the page and try to navigate videos through page numbers u will notice that it is necessary to click twice in order 开发者_StackOverflow中文版to work.

please why is it acting like that?

thank you


Your problem is in the ajax.js file. you are executing the check function before the ajax call is made.

Change:

if (isFirefox() && firefoxVersion() >= 3) {
    httpReq.onload = check(div);
} else {
    httpReq.onreadystatechange = check(div);
}

to:

if (isFirefox() && firefoxVersion() >= 3) {
    httpReq.onload = function(){check(div);};
} else {
    httpReq.onreadystatechange = function(){check(div);};
}

Also, Please look into Sql Injection. At the very least you should not be passing the SQL queries in the url.

0

精彩评论

暂无评论...
验证码 换一张
取 消