|
|
Forum moderator: bigblog |
uCoz Community For Webmasters Custom Solutions How to make previous/next entry button? |
How to make previous/next entry button? |
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 |
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> |
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.
--Moved to Custom Solutions-- Jack of all trades in development, design, strategy.
Working as a Support Engineer. Been here for 13 years and counting. |
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. |
If the next/previous entry is deleted, the next/previous button will disappear.
Is there any better solution for this? |
| |||
| |||