0

So i have an img html tag with an onerror event, something like this:

<img src="http://hello/someImghere.png" onerror="this.src='error.jpg'" />

This works fine in browser but when it gets rendered to outlook and the onerror event gets triggered, the image gets broken and it doesnt change its source because its missing a ' at the end. (This issue only happens when onerror event gets triggered)

Any ideas? i have tried to debug but everything is correct and the html is not missing any character/wrong formatted :( this might an enconding problem perhaps?

Could it be because emails do not support javascript according to this (Is JavaScript supported in an email message?) but why does the html works on chrome when i copy it but also not on IE? :/

EDIT: My question is specifically about onerror event and a single character missing on the html itself, making the img broken.

  • Are you sure about the path for your error img? – Ralph Mar 29 '19 at 14:31
  • Yes im sure, as i said its just missing a ' character at the end of the url :/ – João Cardoso Mar 29 '19 at 14:45
  • Possible duplicate of [Is JavaScript supported in an email message?](https://stackoverflow.com/questions/3054315/is-javascript-supported-in-an-email-message) – esqew Mar 29 '19 at 15:09
  • How is this a duplicated when i asked a specific question? If you read my question, i also added the same link... – João Cardoso Mar 29 '19 at 15:13
  • If it doesn't work in IE, you can use the developer tools (press F12) to see the console, which may have an error message in it. Also, you can look at the network requests, in case the address is not working as intended. – Andrew Morton Mar 29 '19 at 15:53

0 Answers0