I want to open a new window when I click on an image. but
nothing happens when I just add an alert in the onclick-event in my
image.
the images was loaded via "browsing for files".
elem.innerHTML = '<div style="width:200px;float:left"><img src="' + src + '" width="150" height="100" onclick="alert(src)"; /></div';
I click and click and nothing happens. but when I load the image directly via <img>-tag everythings ok...is there a mistake in my code or what´s happening here?
the images was loaded via "browsing for files".
elem.innerHTML = '<div style="width:200px;float:left"><img src="' + src + '" width="150" height="100" onclick="alert(src)"; /></div';
I click and click and nothing happens. but when I load the image directly via <img>-tag everythings ok...is there a mistake in my code or what´s happening here?