I think I understand what you are saying Currently, you're using Ajax to dynamically update your results to a div. Kewl The trick here is to make sure each 'page' in the pager has a similar javascript function defined on the onclick event. This way, the pager doesn't do a 'postback' to the server, but the javascript method is ran ... which calls some ajax here's some sample html a href="#" onclick="DoPagedSearch(1)>1 | 2 .. etc does this make sence?
Make sure the pager is NOT inside a form AND notice the '#' characters? That makes sure that when you click on the text, it doesn't try and goto another HTML page, elsewhere Do you know how to wire up any javascript to an html element? How do you create the html code for the pager?
Try that and keep us posted.
I think I understand what you are saying. Currently, you're using Ajax to dynamically update your results to a div. Kewl.
The trick here is to make sure each 'page' in the pager has a similar javascript function defined on the onclick event. This way, the pager doesn't do a 'postback' to the server, but the javascript method is ran ... which calls some ajax. Here's some sample html... 1 | 2 .. etc does this make sence?
Make sure the pager is NOT inside a form AND notice the '#' characters? That makes sure that when you click on the text, it doesn't try and goto another HTML page, elsewhere. Do you know how to wire up any javascript to an html element?
How do you create the html code for the pager? Try that and keep us posted.
Thanks that works great to a point. The only issue now is the browser scrolls to the top every time I click the paging links. I have also returned false from the DoPagedSearch function so it should not do that right?
Any ideas? – Malcolm May 17 '09 at 7:57 I had the return false after a $('#resultsdiv'). Load call but this did not work.So I put it in the click of the anchor click="DoPaging(2); return false" and this did.
Go figure? – Malcolm May 17 '09 at 13:06.
Use jquery to have the page anchors make an ajax call to the controller. Return the results as JSON or xhtml or whatever format makes you feel happy and use that to replace the content of the div, or build up and replace the contents if JSON. If you haven't dug into jquery, I highly recommend it.
The documentation is rather excellent. Let me provide you a few useful links for this: JSON. Net serializer jQuery Documentation fair example of using jquery for paging The example uses an rss feed (xml) as the source, but It should get you going.
Currently, you're using Ajax to dynamically update your results to a div. The trick here is to make sure each 'page' in the pager has a similar javascript function defined on the onclick event. This way, the pager doesn't do a 'postback' to the server, but the javascript method is ran ... which calls some ajax.
Does this make sence? Make sure the pager is NOT inside a form AND notice the '#' characters? That makes sure that when you click on the text, it doesn't try and goto another HTML page, elsewhere.
Do you know how to wire up any javascript to an html element? How do you create the html code for the pager? Try that and keep us posted.
I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.