I have a snippet that is like this:
<div id="image_input">
<img src="missing-image.png" name="image_comp" />
<input type="text" name="image_url" size="37" />
</div>
I want that when someone unfocus image_url or even do a onChange event, a Javascript function called changeImage() be raised(this I already know how to do, now comes what I don't) and change the image_comp changes to the URL that is written in image_url. How to do this?
getElementByNameis not a function, onlygetElementsByName. This is because the name does not need to be unique likeid.getElementsByNamereturns an array of objects with the specified name.