javascript in IE 8

We needed to get the id of an event that fired and we used there. We tested this functionality in IE 9 and Mozilla Firefox and it was working fine. 

However when this was tested with IE 8 it was not working and it gave an error saying that the is null. Strange ha…

So we did some research on this with the help of google and found out that this is not working with IE 8. In IE 8 if you want to get the Id you need to use the srcElement attribute.
So instead of it should be event. in IE 8.

The best way to get this is use the following method. 

var controlId = ( || event.srcElement).id

This would give you the id of the event of the attribute that fired.


Popular posts from this blog

Error message “User does not have send-as privilege.” when sending emails programmatically in CRM 2011