• Page 1 of 1
  • 1
Forum moderator: bigblog  
How to make previous/next entry button?
Good
Posts: 365
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.
Mar1aN
Posts: 192
Reputation: 3

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

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

Is there any better solution for this?

  • Page 1 of 1
  • 1
Search:
Support
Need help? Contact our support team via the contact form or email us at support@ucoz.com.