Can someone help me? #21485
-
I want to select from a list of images and when anyone of the image is selected/highlighted then if the user clicks on Submit button it should take that user to a url(which will be different for different image),but idk how to do this (know only HTML and CSS) https://gist.github.com/RyDeR-69/6a1086c2a688ad4b708abcbf8be1c80d#gistcomment-3413126gistfile1.html
|
Beta Was this translation helpful? Give feedback.
Replies: 5 comments
-
Hello @RyDeR-69, welcome to the GitHub Support Community. One thing I can think of would be to add a click event to the submit button. Add the following script before the end of the
Then add As for the links, I’m assuming you’re doing them by hand. So, Now, if done correctly, clicking an image and then the submit button should now take you to the links you specified. The script, which makes this possible, is called JavaScript and it’s basically what makes your pages more interactive or do more complex things. You should definitely consider learning it, as it’s a powerful part of web development. I’ve linked two good beginner resources for learning below. |
Beta Was this translation helpful? Give feedback.
-
thanks you so much <3 |
Beta Was this translation helpful? Give feedback.
-
@SethClydesdale thanks for answer, but help me another time. |
Beta Was this translation helpful? Give feedback.
-
Hmm… it sounds like you may have forgotten to add the data-url attribute to each image or the value isn’t set correctly. Try the following. Find:
and replace it with:
Then find:
and replace it with:
Save the file and it should now take you to the specified URLs in the data-url attribute. |
Beta Was this translation helpful? Give feedback.
-
thanks and yeah I’ve been learning html and css for about 1 week :slight_smile: thanks again |
Beta Was this translation helpful? Give feedback.
Hello @RyDeR-69, welcome to the GitHub Support Community.
One thing I can think of would be to add a click event to the submit button. Add the following script before the end of the
</body>
tag.Then add
id="submit"
to the…