Ambiera ForumDiscussions, Help and Support. |
|
[ 1 2 ] Page 1 of 2 |
|
|||||
|
I want to set a general link for the commands next page and prev page. Which are the commands for advanced users? Thanks for any help. |
||||
|
Do you mean they should do the same as the back and forward commands like the ones in the browser? |
||||
|
yes...I mean in the advanced command to link, are the order next and previous, but only with this doesn't work. What else command must be introduced... |
||||
|
That's only the relation attributes of a link, to let search engines etc know that that link is for pagination. For invoking the browser's back command, use the type "Javascript" for a link and instead of the "alert('hello!');" type window.history.back(); or for forward: window.history.forward(); |
||||
|
Thanks, Erik, for your Info, but it's look a bit complicate for me... Can you write me the complete code and how to introduce him as a link into a button... |
||||
|
Well, I found out to put an URL as javascript. Comand "alert('hello!');", works fine...But the problem is: I want to go to the next-prev page in my Rocket Cake! And not a web link.. Normaly you put a link to any page in "my project", but my problem is - when I have 10, 20 pages or more I want to simplify the command with that next-prev order... Any Ideea? |
||||
|
But that depends on what is the next and previous page? And how should RocketCake figure out what you mean? It could likely done by easily writing a javascript for that depending how you name your pages - like for example if the first page is named page1.html and the last one page99.html, then that a script could do that for you. |
||||
|
Well, my idea - by a photo or a picture album with about 24 pages (album 1.html, album2.html...album 24.html) it could be easier for the builder to use that next-prev link/button. Something like the function "call a rocketCake action" for next-prev picture in Slideshow... So, my question - is it possible to add an extra function also for next -prev pages. |
||||
|
You could do it like this: (best is to do this once on a master page, otherwise you need to do this for each page again which then would defeat the reason why you are doing this after all): Put a JavaScript-Element onto the page, double click it and paste this code into there: function gotoNext(add) Uncheck the "Create div around code" option for the JavaSript element in the property window. Then, create the two buttons "prev" and "next" or however you want them to be named. Right click them and add a hyperlink on them. And as URL enter this for the next button: javascript:gotoNext(1); and this for the prev button: javascript:gotoNext(-1); Then it should work, provided your pages are named 'album12.html" and similar. |
||||
|
Thanks Niko...it works fine! Best regards! |
||||
|
For Niko...Hi, as I said, the javascript works fine...but only to page nr. 10! If I want to go back to nr. 9, the script is looking for page 19!! Hm... What do you mean? |
||||
|
Are you sure your pages are all named according to the schema above (albumXX.html)? Because in your list above ("album 1.html, album2.html...album 24.html"), you've used spaces between the number and the text "album" sometimes. |
||||
|
works fine...but only to page nr. 10! If I want to go back to nr. 9, the script is looking for page 19 I guess, to serialize the pages, you must use the same number of digits consistently through all pages. For example: if your total number of pages is going to be higher than 99 then ... - page 1 should be "page001.html" - page 10 should be "page010.html" - page 100 should be "page100.html" |
||||
|
Well, I checked it again...it works fine to page10.html, or also to page 010.html, and beginning with page1.html or page001.html. But the problem is the number "10". By next page "javascript:gotoNext(1);" like page11.html, the script is looking for page111.html, and by previous page "javascript:gotoNext(-1);" the script is looking for page19.html...and not the normal page9.html... My question: can only this script count to 10...?!! Any idea? |
||||
|
Oh, you are right, there was a bug in the code above. Fixed the code above. Update it and then it should work. |
[ 1 2 ] Page 1 of 2 |
|