• Page 1 of 1
  • 1
Forum moderator: bigblog  
uCoz Community » For Webmasters » Custom Solutions » How to make previous/next entry button?
How to make previous/next entry button?
Good
Posts: 360
Reputation: 12

Message # 1 | 3:10 PM
Dear all,

I would like to make the Previous Entry/ Next Entry Button in File Catalog? The button is the same as Online game (/stuff).
But in the game module, we can put the code $PREVIOUS_ENTRY_$ but it does not work on others modules. Please help me!!!

Thanks
Phantom_of_the_Opera
Posts: 25
Reputation: 3

Message # 2 | 5:52 PM
try a Script

Code
<div id="pages"></div>   
  <script>   
  a=location.href;   
  b=a.split('-');   
  c=b.length;   
  d=eval(c-1);   
  e=b[d];   
  f=a.split('-'+e)[0];   
  $('#pages').html('<a id="b" href="'+f+'-'+eval(e-1)+'">Previous</a><span id="i"> | </span><a id="a" href="'+f+'-'+eval(e*1+1)+'">Next</a>');   
  $.ajax({   
  type: 'GET',   
  url: f+'-'+eval(e*1+1),   
  error: function(){$('#a, #i').hide();}   
  });   
  $.ajax({   
  type: 'GET',   
  url: f+'-'+eval(e-1),   
  error: function(){$('#b, #i').hide();}   
  });   
  </script>

Paradox
Old Guard
Posts: 3284
Reputation: 145

Message # 3 | 8:31 AM
Good, please keep in mind we do not generally provide custom solutions unless you request them in the correct boards. From what I have seen the script provided above should work. If you need anything further please feel free to add to the thread. smile

--Moved to Custom Solutions--

Jack of all trades in development, design, strategy.
Working as a Support Engineer.
Been here for 13 years and counting.
Good
Posts: 360
Reputation: 12

Message # 4 | 12:32 PM
Paradox, Sorry for posting on wrong board.

Phantom_of_the_Opera, your script is Ok. Thanks for your help but it is not what I mean. Next and Previous Button is the same as Online Game Module (Stuff). I need it on other modules such as Blog, Publisher, File Catalog, Dir...

When we click next or Previous, it will automatically move to the next or previous entry in category. For example, there are 6 entries in one category. Now, I am in the entry 3rd, when clicking next button, it will move to entry 4th or previous it will be entry 2nd.

I am sorry because my english is not good.
Mar1aN
Posts: 192
Reputation: 3

Message # 5 | 9:21 PM
This script does not work well dry
lanh
Posts: 135
Reputation: 0

Message # 6 | 8:35 AM
If the next/previous entry is deleted, the next/previous button will disappear.

Is there any better solution for this?

uCoz Community » For Webmasters » Custom Solutions » How to make previous/next entry button?
  • Page 1 of 1
  • 1
Search: