Risc OS Posted September 25, 2008 Share Posted September 25, 2008 The method click() doesn't seem to work on img tags, even though they can have an onclick attribute. Is there another way I can simulate the clicking of an img? Quote Link to comment Share on other sites More sharing options...
RichardRotterdam Posted September 25, 2008 Share Posted September 25, 2008 putting it in a link maybe? and click should work for images <img src="some_image.jpg" onclick="alert('yes you clicked the image now be happy with it')"/> and what do you mean with click() if the onclick works? Quote Link to comment Share on other sites More sharing options...
web_loone_08 Posted September 25, 2008 Share Posted September 25, 2008 did you add an onclick handler to the image; so DOM would know what to do - when click() was called? also note; that if you are trying to trigger click() onload - you could be running into browser security walls - if that is what your doing; then that may be why you are not able too get click() to work. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.