-1

Hey guys,
I would like that when the HTML page loads to my website, if the user enters a word and presses a specific key (e.g. enter). The event should occur on the page and manipulate an object already existing on the page.
Here is an example:
1.) The webpage load
2.) The user enter a word, suppose "cow", and pressed the enter key.
3.) The Image of the cow disappears: cowImg.setAttribute("style", "display:none");

There is no input box where the user enters "cow". It must be done on the page and if the keyword is not followed by the press of the enter key, the event should not occur.

3
Contributors
2
Replies
17
Views
4 Years
Discussion Span
Last Post by Troy III
0

There is no input box where the user enters "cow". It must be done on the page and if the keyword is not followed by the press of the enter key, the event should not occur.

Giving an outline is good but without an actual code then it would be hard for anyone to see what you are talking about.

-1

This is doable, but it will require some scripting...
But I see another problem;

You say: "2.) The user entered a word,...", and pressed the enter key".
My question is, -where will the user enter the word?
Given the heads-up that: "There is no input box where the user enters "cow".

Your end-users/clients,-In case that they'll understand (if they understand) the "task" (about being required to type names of things they see on the page), they will also be forced on blind-typing!
Which is, a bad experience, as they say.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.