Event srcelement is null




















Remove From My Forums. Asked by:. Sign in to vote. Hi, when i try to close a particular form in CRM , i get the following error. Monday, September 3, AM. Hi Kruthi, Can you please share the snippet you've used to close the page? I would suggest following for closing CRM page. I manually tried closing the form, not programmatically. Hi Kruthi, Have you used ' srcElement. If so, then first check for the object being NOT null. Hi, Just check the javascripts used in the form.

Thanks, Prasad If you find the post helpful please mark it as answered. I have a read only field on the form and was trying to copy a value from that field. Hi, Just paste your javscript in Visual studio JS file to check if all the brackets are closed properly or not. Instead of using the event , just pass the clicked element to the javascript function.

You could use jQuery library wich would help with cross browser issues. Using jQuery you could use event. Stack Overflow for Teams — Collaborate and share knowledge with a private group.

Create a free Team What is Teams? Collectives on Stack Overflow. Learn more. Asked 9 years, 1 month ago. Active 9 years, 1 month ago. Viewed 2k times. What would be the possible solution to this problem.

Selected answer solves my problem but doesn't answers the question!!! Ivan Davidov. Ivan Davidov Ivan Davidov 9 9 silver badges 23 23 bronze badges.

You're sure that srcElement is null and not event for some reason? I used event object to calculate mouse cursor position in a way that jquery does it since the content is auto-generated and couldn't do jquery stuff so easily.

Add a comment. Active Oldest Votes. Totally forgot about that, what I did was to add additional parameter to a function call and pass element's dynamically generated class name to that function. Thanks for the answer. Vytautas Butkus Vytautas Butkus 4, 6 6 gold badges 26 26 silver badges 45 45 bronze badges. I tried to avoid using jQuery for this since content is dynamically generated, including class names, onclick event etc.

For now, my workaround was to pass generated class name itself to the function that is called and to ignore event handling since I don't have much time to finish this. Thanks for your answer.



0コメント

  • 1000 / 1000