I tried doing this, there's an image and an input field. The input field is kept hidden. When I click on the image, the input field will change from hidden to text.
The code I tried is below:
function inp()
{
var y=document.getElementByID("hiddenInput");
y.type= "text";
}
HTML:
<img src="lc.png" height="120px" onclick="inp()" />
<div><input type="hidden" id="hiddenInput" placeholder="What are you looking
for?"></div>
Things are not working. The image is not on-clickable, and nothing happens when we click. I would be glad if anyone can tell me please where the problem is?
There are another questions on stack overflow asking how to make an image on-clickable, I tried the code, and it went wrong, so I asked where the mistake is.. Now I got the answer. It is a silly mistake, but I think it's okay since I am new here.. Thanks to those who helped me. My problem is solved now :)