Answered
Splitting a query with modulo
Hello
I'm stuck in a problem which I started in an other post. Unfortunately I didn't really get the answers which satisfy me. Even though there were good inputs.
Assume we have a query with 9 results and I would like to build DIVs containing 2 results each. Every DIV is set to 'display: none;', so nothing is displayed on a page for the moment!
Somewhere below these DIVs I place back and forward arrows in DIVs to navigate through the DIVs above without reloading the page (!). I managed to build the sets of DIVs an giving them an ID (see code). Every ID appears twice, once in the DIV containg the 2 results and once in the DIV containing the navigation arrows. This because I want to display the arrows (always a set of 2) depending on where I am staying in navigation. Means, when I display the first DIV there is no option to go backwards, so the back arrow is inactive. If you go one step forward you can navigate backwards and forwards so both arrows have to be active. At the very end you cannot navigate forward any longer so I would like to display a forward button which I inactive (and a backwards button which is active).
The whole displaying should be controled by JavaScript.
It seems that I have several problems. First the Javascript isn't working properly - I couldn't figure out why? And the Mozilla shows all DIVs. And then the whole navigation through the sets doesn't work the way it should. I prepared the entire code (see below). You can add it to an empty cfm file and it should work - at least whats working for the moment ;-)
I'm really thankful for a solution.
I'm stuck in a problem which I started in an other post. Unfortunately I didn't really get the answers which satisfy me. Even though there were good inputs.
Assume we have a query with 9 results and I would like to build DIVs containing 2 results each. Every DIV is set to 'display: none;', so nothing is displayed on a page for the moment!
Somewhere below these DIVs I place back and forward arrows in DIVs to navigate through the DIVs above without reloading the page (!). I managed to build the sets of DIVs an giving them an ID (see code). Every ID appears twice, once in the DIV containg the 2 results and once in the DIV containing the navigation arrows. This because I want to display the arrows (always a set of 2) depending on where I am staying in navigation. Means, when I display the first DIV there is no option to go backwards, so the back arrow is inactive. If you go one step forward you can navigate backwards and forwards so both arrows have to be active. At the very end you cannot navigate forward any longer so I would like to display a forward button which I inactive (and a backwards button which is active).
The whole displaying should be controled by JavaScript.
It seems that I have several problems. First the Javascript isn't working properly - I couldn't figure out why? And the Mozilla shows all DIVs. And then the whole navigation through the sets doesn't work the way it should. I prepared the entire code (see below). You can add it to an empty cfm file and it should work - at least whats working for the moment ;-)
I'm really thankful for a solution.
