Skip to content

Can someone help me? #21485

Discussion options

You must be logged in to vote

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.

<script>
// handle click event for #submit
document.getElementById('submit').onclick = function () {
  var img = document.getElementById(window.location.hash.slice(1)); // slice removes the hash

// take user to the image's data-url
if (img) {
window.location.href = img.dataset.url;
}

// alert the user if the image cannot be found or is not selected
else {
alert('Please select an image.');
}

return false; // prevent submit button from updating the page hash
};
</script>

Then add id="submit" to the…

Replies: 5 comments

Comment options

You must be logged in to vote
0 replies
Answer selected
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants