Asked by:
crmForm.all key word not working in other than IE browser

Question
-
hi frnds,
In my project am using onclick event of the lookup control.so i used the below code in my onload event.Its working fine in IE browser but not working in other browser.My code is,
crmForm.all.fieldname.onclick= function () {
alert("hi");
};can any one give me a solution as soon as possible.Thanx in advance.
Arun Kumar G
Tuesday, September 3, 2013 5:37 AM
All replies
-
Hi Aron,
Are you still using CRM 4.0 ??, if yes then I hope you know that CRM 4.0 does not support multi browser, and if you are still using crm 4.0 code in crm 2011, you should upgrade your code to crm 2011.
Then you can try to use attach event in IE to add your custom onclick event and addEventListener in other browsers.
HTH
Our Website | Our Blog | Follow US | My Facebook Page | Microsoft Dynamics CRM 2011 Application Design
Make sure to "Vote as Helpful" and "Mark As Answer",if you get answer of your question.Tuesday, September 3, 2013 6:01 AMModerator -
Hi
CRM 4 does not support cross browsing. You should use CRM 2011 and install Rollup 12 to support all browsers.
Tuesday, September 3, 2013 6:10 AM -
This is CRM 4.0 code, which only works in IE for CRM 2011, which is why it doesn't work on your other browsers.
Since onclick is not a supported event in CRM 2011, you will need to access the DOM directly:
document.getElementById("fieldname").onclick= function () { alert("hi"); };
Hope that helps
Paul
If my response helped you find your answer please show your thanks by taking the time to "Mark As Answer" and "Vote As Helpful".
- Proposed as answer by Paul Nieuwelaar Tuesday, September 3, 2013 7:29 AM
Tuesday, September 3, 2013 6:13 AM -
hi frnds,
Is there any alternate solution for this onclick event to use in crm 2011?If yes, please send me a solution..
Thanx in advance.
Arun Kumar G
Tuesday, September 3, 2013 7:03 AM -
Arun,
Paul has suggested an alternate solution above. If not that then you can use OnChange event. Refer the below posts
http://crmdm.blogspot.com/2011/03/how-to-retrieve-lookup-text-value-id.html
Hope this helps!
If my response helps you in finding your answer then please click 'Mark as Answer' and 'Vote as Helpful'
Tuesday, September 3, 2013 7:24 AM