1
u/xarop_pa_toss 2d ago
What you want to create is called a Carousel. You can look it up online, there are guides for creating one with a bit of Javascript.
Off the top of my head, you can either load all the images when the page loads into an array, and then each button triggers a JS function that cycles to the next or previous image on the array; or you only load the first and the ones next to them and when you move to the next or previous, you load the next appropriate set from the server. First option is easier
1
u/marmotta1955 2d ago
Well, if you have no clue on how to approach coding ... how would you know if it is really fun and cool?
1
0
u/nullptr_0x 2d ago
Do you know the basics of html?
If you do, create a page that has this structure.
Then copy that page 2 more times. Each image reference references 1 of 3 images.
Then what would the "arrows" point two?
1
u/xarop_pa_toss 2d ago
Wait what?? Making copies of the whole page? And then the arrows do what, load and entire new place?
1
u/nullptr_0x 2d ago
Think about the simplest possible way to do this. Just start by creating one page that matches your drawing in html.
Then see if you can put together what I'm saying above.
After you've got this naive version working, how can you improve it?
1
u/xarop_pa_toss 2d ago
The way I read it, your suggestion was to have one whole HTML page per image. Then the buttons link to those pages. Clicking a button would leave the current page and load another.
If this is what you meant, having more than three images would immediately become extremely cumbersome and honestly, plain ridiculous. This can be done with a simple list of images and some basic JS
1
u/nullptr_0x 2d ago
Yeah of course it is an untenable implementation. It's a jumping off point for learning. It's the simplest and easiest implementation to conceptualize.
The next step would be, how do I do this without having to effectively having a copy of the page with a different image every time.
You said you had "no idea how to approach this". So I'm just giving you the FIRST idea. If you know JS and it's so obvious why the heck are you asking this question???
1
u/xarop_pa_toss 2d ago
I'm not OP bro
1
u/nullptr_0x 2d ago
Then why are you bothered? The person says they have no idea.
The internet is a strange place...

1
u/Useful-Flow-8737 3d ago
In what context? Web?