Double Post

QuestionsDouble Post
Don Mangold asked 10 years ago

I am getting my web page posting two times. Looks like once when the page loads and once when the grid loads – Can I control this ?

3 Answers
Abu Ghufran answered 10 years ago

Currently it works this way. The first normal page load build the structure of the grid and the second ajax calls loads data.

Don Mangold answered 10 years ago

Is there any way I can tell the difference between the two?

Thanks

Abu Ghufran answered 10 years ago

$is_ajax = (!empty($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest');

if ($is_ajax)
{
//second call
}
else
{
//first call
}

Your Answer

11 + 14 =

Login with your Social Id:

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.



How useful was this discussion?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate it.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?