tag:blogger.com,1999:blog-5472436831307966815.post6946640352166423458..comments2024-03-20T00:30:07.883-06:00Comments on Daniel Cai's Blog: Another Talk about Referencing External JS Files in MSCRM FormDaniel Caihttp://www.blogger.com/profile/05461949321689249420noreply@blogger.comBlogger8125tag:blogger.com,1999:blog-5472436831307966815.post-66795236233370267872010-12-10T07:37:37.095-07:002010-12-10T07:37:37.095-07:00@Joost, you should be able to debug your js file. ...@Joost, you should be able to debug your js file. I usually add debugger; statement in the file wherever I want to start to debug. This seems to be more efficient than IE8 developer tool, as I think it takes tremendous effort to locate the particular line of code that you want to debug using IE8 developer tool. <br /><br />The key is to make sure that your JS file doesn't have any syntax error.Daniel Caihttps://www.blogger.com/profile/05461949321689249420noreply@blogger.comtag:blogger.com,1999:blog-5472436831307966815.post-62175199201797547362010-12-10T07:32:26.667-07:002010-12-10T07:32:26.667-07:00Hi Daniel,
Thanks for sharing. I used to insert s...Hi Daniel,<br /><br />Thanks for sharing. I used to insert scripts in the head tag. I think your solution is more elegant. I have one issue however, it seems to be impossible to debug the js files (with ie8 developer) when included using your aproach. Do you have any thoughts on this?<br /><br />Regards,<br />JoostAnonymoushttps://www.blogger.com/profile/17348356123786240643noreply@blogger.comtag:blogger.com,1999:blog-5472436831307966815.post-82013891078711812482010-05-06T10:50:13.899-06:002010-05-06T10:50:13.899-06:00Hi Daniel,
I didn't know that IE dev tools in...Hi Daniel,<br /><br />I didn't know that IE dev tools included this feature.<br /><br />Thanks for the info :)<br /><br />EuGEugenehttp://social.msdn.microsoft.com/Profile/en-US/?user=EugeneMoulin&referrer=http%3A%2F%2Fsocial.msdn.microsoft.com%2FForums%2Fen-US%2Fcrm%2Fthreads%3Fprof%3Drequired&rh=VIM2i32gRzTdq9GEujInQRU48RNI81kKVnocSjTwcjs%3D&sp=forumsnoreply@blogger.comtag:blogger.com,1999:blog-5472436831307966815.post-77391083203245392262010-05-06T08:14:48.377-06:002010-05-06T08:14:48.377-06:00Hi EuG,
That's precisely what I am using her...Hi EuG, <br /><br />That's precisely what I am using here. When it comes to dealing with browser cache issue, I found that the IE developer tools is very handy. I can clean IE browser cache with one single mouse click. IE 8 has the feature out-of-box. Just a heads up, in case you may not notice before. <br /><br />Cheers,<br />DanielDaniel Caihttps://www.blogger.com/profile/05461949321689249420noreply@blogger.comtag:blogger.com,1999:blog-5472436831307966815.post-65106514160339616562010-05-06T07:26:48.637-06:002010-05-06T07:26:48.637-06:00Daniel,
It is ok now, i've just modified your...Daniel,<br /><br />It is ok now, i've just modified your loadexternalscript function.<br /><br />function loadExternalScript(url) <br />{ <br /> var x = new ActiveXObject("Msxml2.XMLHTTP"); <br /> x.open("GET", url + '?nocache=' + Math.random, false); <br /> x.send(null); <br /> window.execScript(x.responseText); <br />} <br /><br />I've added a fake parameter at the end of the url so that the cache cannot recognize it...<br /><br />Thanks again for your code !<br /><br />EuGEugene Moulinhttp://social.msdn.microsoft.com/Profile/en-US/?user=EugeneMoulin&referrer=http%3A%2F%2Fsocial.msdn.microsoft.com%2FForums%2Fen-US%2Fcrm%2Fthreads%3Fprof%3Drequired&rh=VIM2i32gRzTdq9GEujInQRU48RNI81kKVnocSjTwcjs%3D&sp=forumsnoreply@blogger.comtag:blogger.com,1999:blog-5472436831307966815.post-8846939411195972882010-05-06T06:55:04.064-06:002010-05-06T06:55:04.064-06:00Hi Daniel !
THanks a alot for this code, i'm ...Hi Daniel !<br /><br />THanks a alot for this code, i'm using the second approach since this morning.<br /><br />Everything is fine, but i have one question : I've modified an event function just to add an alert to see how it refreshes when i modify my script files... <br />The fact is that the new code doesn't seem to execute, even if i reload (then re-inject the scripts) the form...<br /><br />Is it normal ?<br /><br />Thanks in Advance<br /><br />Eugene MoulinEugene Moulinhttp://social.msdn.microsoft.com/Profile/en-US/?user=EugeneMoulin&referrer=http%3A%2F%2Fsocial.msdn.microsoft.com%2FForums%2Fen-US%2Fcrm%2Fthreads%3Fprof%3Drequired&rh=VIM2i32gRzTdq9GEujInQRU48RNI81kKVnocSjTwcjs%3D&sp=forumsnoreply@blogger.comtag:blogger.com,1999:blog-5472436831307966815.post-41840773726330676912010-02-24T16:15:55.010-07:002010-02-24T16:15:55.010-07:00Thanks Nate. I believe it's the nature of life...Thanks Nate. I believe it's the nature of life that we grow by learning from each other.Daniel Caihttps://www.blogger.com/profile/05461949321689249420noreply@blogger.comtag:blogger.com,1999:blog-5472436831307966815.post-25708546485560032712010-02-23T12:41:14.888-07:002010-02-23T12:41:14.888-07:00Fantastic! I was using this approach, which used...Fantastic! I was using this approach, which used more then a page of code to check if the files are loaded before moving on: http://kiavashshakibaee.blogspot.com/2009/02/reference-external-javascript-file-in.html <br /><br />So this is a big improvement in simplicity and readability! Thanks a lot!Natehttp://www.springvalleysigns.comnoreply@blogger.com