SitePoint Sponsor |
|
User Tag List
Results 1 to 6 of 6
-
Apr 24, 2009, 10:29 #1
- Join Date
- Jun 2006
- Posts
- 109
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
ajax pagination two instances on same page ?
After some research I found solution to paging my content with ajax (php mysql). I have one index which include paging.php and this is ok, but after adding second paging2.php file after clicking on more news content apears on block which is reserved for second paging content.
Here is page where you can see this
http://www.eparhijazvornickotuzlanska.org/index7.php
Notice that first and second paging file works perfectly
separately.
Any idea ?
-
Apr 24, 2009, 10:36 #2
- Join Date
- May 2006
- Location
- Lancaster University, UK
- Posts
- 7,062
- Mentioned
- 2 Post(s)
- Tagged
- 0 Thread(s)
Your problem is that you are setting both requests to use the same function, stateChanged().
In the first file, this writes into the correct box, however because you're creating the same function again in the second file, you're redefining the function to write into the second box.
Simple solution. In ajax_req2.js, replace all instances of 'stateChanged' with 'stateChanged2' - do a mass replace in your editor or something. Your issue should then be fixed.Jake Arkinstall
"Sometimes you don't need to reinvent the wheel;
Sometimes its enough to make that wheel more rounded"-Molona
-
Apr 24, 2009, 10:41 #3
- Join Date
- Jun 2006
- Posts
- 109
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
thanks man, I really appreciate.
Regards,
-
Apr 24, 2009, 10:55 #4
- Join Date
- May 2006
- Location
- Lancaster University, UK
- Posts
- 7,062
- Mentioned
- 2 Post(s)
- Tagged
- 0 Thread(s)
Any time
Jake Arkinstall
"Sometimes you don't need to reinvent the wheel;
Sometimes its enough to make that wheel more rounded"-Molona
-
Apr 24, 2009, 11:04 #5
- Join Date
- Jun 2006
- Posts
- 109
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Every random time's on accessing index page content from paging2.php is showing on both places, on left and right side of page.
After refreshing everyting is ok. What can be a problem ?
-
Apr 24, 2009, 12:08 #6
- Join Date
- May 2006
- Location
- Lancaster University, UK
- Posts
- 7,062
- Mentioned
- 2 Post(s)
- Tagged
- 0 Thread(s)
Sorry but I can't replicate that problem...
Jake Arkinstall
"Sometimes you don't need to reinvent the wheel;
Sometimes its enough to make that wheel more rounded"-Molona
Bookmarks