PHP+Kendo Grid ServerPaging first Page lists all entries - php

I've got a working kendo grid with remote data from the webserver.
But the paging isn't working as expected. If the page gets loaded the first time, or I click on page 1 the server returns all the data available.
If I click on page 2 oder every other page than the first one it works fine.
The query seems to be correct as you can see in the screenshot from firebug.
So anyone got a hint for me where to look at?

Just found the problem. I was removing empty parameters on the serverside. So I was throughing away the "skip" which screwed the query up.

Related

Faulty when print large number of pages in HTML PHP

My project required me to make a print button that should be able to print each personal detail in a page. I have about 1400 personal details, and that means 1400 pages to print.
I am using pagebreak at the print page.
And I am using a while statement to print all the personal details, it works fine as I expected, until page 504. So I think there's no problem with my code.
This is the example output for page 1 until 504:
On the following pages, 505 and so on, the page format keeps changing for each page and I really cannot figure out why because it works well on the previous 504 pages.
Is it actually so that it cannot be printed with a large number of pages?
Any suggestions or workarounds are very appreciated.
Thank you.
Have you tried temporarily deleting your 504th and 505th record to see if the issue to attributed to the data or your code? I see no reason why a while loop would fail in the middle of the records. You may want to post a snippet of your looping output code to allow more feedback here..

Waiting time until finished

I know the title isn't very descriptive, and that's because I don't know the why to this pseudo-problem.
I have a website in php that makes queries to different databases and show the results in a table.
That is working just fine.
My "problem" is that when a query is being processed and the browser is showing the loader icon if i open a second tab it wont load until the first is finished.
I really need to avoid this, but I don't know where the restriction is. Is it something that the browser does?
Two tabs in google chrome wont work, neither two tabs in safari. But the same page opened in both browsers works just fine and there is no "waiting until finished".
Thanks in advance for your help, im really lost here.

ClListView Ajax pagination sometimes not working

I have this website http://www.kdomestriha.cz/recenze-kadernicvi which basically shows list of hairdressers you searched for. When you enter one word term and search (you can try "Praha"), ajax update on pagination works perfectly fine. However if you try to enter two words (you can try Hradec Králové), pagination will refresh whole site. I am not sure, if showing all of my code helps... Does anyone have any clue what could be a cause of this strange behavior? Thanks
Since you didn't post any code, only way I got that looking your web source, and I point what wrong was in it.
If I searched by word "Praha", your web would generate following things:
<div id="Praha" class="list-view">....
After then in jQuery, you have code to access it through syntax:
$('#Praha').....
In order to achieve your own purpose, I think you used searching word as element id, it would caused the problem if you entered more one word into your filter, space character is not a valid for ID attribute in jQuery
$('#Hradec Králové').. //failed
It did not raise any error, but it wouldn't work as you expected.
If pagination is causing your site to refresh, the most likely cause is that something in the search/filter result is causing javascript error, thus causing yii to revert to full page refresh.
I'd advice that you look at your page in chrome's web inspector (cos that's what I use) after searching and confirm that the javascript isn't broken

JQGrid data not loading on page load

I am using JQGrid
I have it on 2 domains (same code)... On domain 1, I have not problems with the loading of data when the page loads.
On Domain 2 I have the exact same code but with a problem.
When the page loads it won't load the data but when I click the refresh button on JQGrid the data loads fine but never during page load.
I've looked at the code and it seems the same to me.
Does anyone have any ideas on what could make this strange thing happen?
I've run out of ideas on where to look.
Run fiddler and see whats causing the issue.

page view count increaes by two each time its loaded

Here is my php code:
#mysql_query("UPDATE mp3 SET views = views+1 WHERE id = '".mysql_real_escape_string($id)."'");
I have that in my header with some other PHP, every time I load the page, the view count goes up by 2 instead of one, what would be the cause of this? I checked the script over and everything looks fine. Thank you.
Check your CSS file or section for a URL background that is empty. That is the most common quirk that produces a double-retrieval.
Failing that, have a look in Firefox-Firebug / Chrome developer tools or something similar for which part of the code is causing the page to be loaded twice each time

Categories