<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://www.infopathdev.com:443/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Browser Forms</title><link>https://www.infopathdev.com:443/forums/40.aspx</link><description>For browser form specific questions</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Guru Advice: Tracking "IsDirty" with InfoPath Forms Services</title><link>https://www.infopathdev.com:443/forums/thread/51720.aspx</link><pubDate>Fri, 12 Feb 2010 16:39:49 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:51720</guid><dc:creator>Alec Pojidaev</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/51720.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=40&amp;PostID=51720</wfw:commentRss><description>&lt;p&gt;&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="/Themes/infopathdev/images/icon-quote.gif"&gt; &lt;strong&gt;warrtalon:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;so it is limited only to checking changes in the form unless I missed something&lt;/div&gt;&lt;/BLOCKQUOTE&gt;&lt;/p&gt;
&lt;p&gt;Yes you did missed somthing. It also not launching spaceships to the Moon and not doing many more other useful things. It only does exactly what topic starter wants. It&amp;#39;s unacceptable I know. :)&lt;/p&gt;</description></item><item><title>Re: Guru Advice: Tracking "IsDirty" with InfoPath Forms Services</title><link>https://www.infopathdev.com:443/forums/thread/43948.aspx</link><pubDate>Wed, 08 Jul 2009 14:25:10 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:43948</guid><dc:creator>warrtalon</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/43948.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=40&amp;PostID=43948</wfw:commentRss><description>&lt;p&gt;Alec, it does have far more, and it does not get installed to the server.&amp;nbsp; It&amp;#39;s just a local installation, and you inject to your own forms.&amp;nbsp; The only administrative interaction would be if you use qRules for browser forms.&amp;nbsp; There are at least 6 qRules in 1.7 that I will be using regularly, and the others I just haven&amp;#39;t tested yet to figure out where I&amp;#39;d use them.&lt;/p&gt;
&lt;p&gt;I use all of your codeless stuff, and this one you saw me test, but it does not check for invalid fields (data validation, etc), so it is limited only to checking changes in the form unless I missed something.&lt;/p&gt;</description></item><item><title>Re: Guru Advice: Tracking "IsDirty" with InfoPath Forms Services</title><link>https://www.infopathdev.com:443/forums/thread/43947.aspx</link><pubDate>Wed, 08 Jul 2009 14:01:38 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:43947</guid><dc:creator>Alec Pojidaev</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/43947.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=40&amp;PostID=43947</wfw:commentRss><description>&lt;p&gt;&amp;gt;but while it&amp;#39;s less work...&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t think Installing 3rd party admin approved assembly to the server is less work than creating 2 fields and copying 2 XPath expressions especially when you are not wearing admin hat too. The thing has to have much more value/functionality to&amp;nbsp;a form&amp;nbsp;than ability to track Dirty status to justify installations of itself.&lt;/p&gt;</description></item><item><title>Re: Guru Advice: Tracking "IsDirty" with InfoPath Forms Services</title><link>https://www.infopathdev.com:443/forums/thread/43927.aspx</link><pubDate>Wed, 08 Jul 2009 05:59:35 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:43927</guid><dc:creator>Patrick Halstead</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/43927.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=40&amp;PostID=43927</wfw:commentRss><description>&lt;p&gt;Hey, that&amp;#39;s some killer xpath dude! :) &lt;/p&gt;
&lt;p&gt;Our free qRules 1.7 (due out next week) will have an IsDirty rule which will use InfoPath&amp;#39;s IsDirty bit and doesn&amp;#39;t require an InitialState node, but while it&amp;#39;s less work, it&amp;#39;s not as clever as your approach. :) &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Guru Advice: Tracking "IsDirty" with InfoPath Forms Services</title><link>https://www.infopathdev.com:443/forums/thread/43897.aspx</link><pubDate>Tue, 07 Jul 2009 19:10:09 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:43897</guid><dc:creator>Alec Pojidaev</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/43897.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=40&amp;PostID=43897</wfw:commentRss><description>&lt;p&gt;Same with no code:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://alecpojidaev.wordpress.com/2009/07/06/how-to-check-if-your-form-is-dirty/"&gt;http://alecpojidaev.wordpress.com/2009/07/06/how-to-check-if-your-form-is-dirty/&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Re: Guru Advice: Tracking "IsDirty" with InfoPath Forms Services</title><link>https://www.infopathdev.com:443/forums/thread/36546.aspx</link><pubDate>Sun, 04 Jan 2009 16:40:31 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:36546</guid><dc:creator>samhuang</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/36546.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=40&amp;PostID=36546</wfw:commentRss><description>The code is executed every time the form unloaded? Is it possible to capture the change in real time? Like that of event handlers?&lt;br /&gt;&lt;p&gt;Regards,&lt;/p&gt;&lt;p&gt;Sam &lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: Guru Advice: Tracking "IsDirty" with InfoPath Forms Services</title><link>https://www.infopathdev.com:443/forums/thread/26992.aspx</link><pubDate>Tue, 04 Mar 2008 23:26:23 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:26992</guid><dc:creator>eeyore145</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/26992.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=40&amp;PostID=26992</wfw:commentRss><description>&lt;p&gt;Well this is resolved for now--what I wound up doing is grabbing the MD5 hash against the data array which is rendered to the client (g_objCurrentFormData). It didn&amp;#39;t work at first,&amp;nbsp;since InfoPath Forms Services runs its own &amp;quot;InfoPath Onload&amp;quot; event AFTER the window.onload event.&amp;nbsp;&amp;nbsp;I&amp;nbsp;was able to piece together the proper methodology to get the proper MD5 hash of the client rendered data array, which does update each time a field is changed.&lt;/p&gt;
&lt;p&gt;In the Window onload event I get the hash and store it in a hidden field and then in the window unload event I get the hash again, using a javascript variable to check against postback, since we don&amp;#39;t want to check in this case, by registering a submit block handler via ASP.net and managed code.&amp;nbsp; If they do not match a change occured within THIS view.&amp;nbsp; InfoPath forms services renders the&amp;nbsp;views dynamically and also note, I have 8 views and this form is massive (the XSN is about 500 KB in size). As the user switches views, I still need to track the dirty state, etc.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;So what I wound up doing is using two hidden fields and a server and client side approach.&amp;nbsp; This data array hashing has good performance but I also used the schema_changed event (top level, could NOT use individual control level onchange events because I have over 600 fields).&amp;nbsp; I would ONLY flag the first change in the schema_changed event, by leveraging the FormState dictionary object and some booleans and other logic.&amp;nbsp; When the user switches views, which is a command button on my form, this invokes a postback.&amp;nbsp; After this postback, the .NotifyHost() call I have when IsDirty is true (at&amp;nbsp;InfoPath object/VSTO&amp;nbsp;level) is invoked. Now the SERVER can track a hidden field on postback when the views switch. The XmlFormViewer control then would set a FormState property back to false, signifying the InfoPath Object to start trackking is dirty again, given a change occurs after this notification, etc. The solution needed to be tiered, because of the number of views, complexity and number of potential &amp;quot;Is dirty&amp;quot; options which could occur, etc.&lt;/p&gt;
&lt;p&gt;This solution works great and it took me a while to resolve the proper mix.&amp;nbsp; Of course, my client level MD5 hashing is not supported, but no javascript, client level solution would be - - so I picked the best performance option.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Thanks for your feedback&lt;/p&gt;
&lt;p&gt;&amp;nbsp;MK&lt;/p&gt;</description></item><item><title>Re: Guru Advice: Tracking "IsDirty" with InfoPath Forms Services</title><link>https://www.infopathdev.com:443/forums/thread/26957.aspx</link><pubDate>Mon, 03 Mar 2008 23:59:42 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:26957</guid><dc:creator>davidair</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/26957.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=40&amp;PostID=26957</wfw:commentRss><description>&lt;p&gt;If you are writing this in javascript on the page that hosts forms server, you&amp;nbsp;could inspect the data tree (say, in your onunload handler) and find out if the data is dirty or not in the following way:&lt;/p&gt;
&lt;p&gt;// Checks if user actions have changed data&lt;br /&gt;function CheckIfDirty()&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;var objViewDataNode;&lt;br /&gt;&amp;nbsp;// Get the root of the data tree&lt;br /&gt;&amp;nbsp;objViewDataNode = CurrentFormData.ViewDataTree();&lt;/p&gt;
&lt;p&gt;&amp;nbsp;while (objViewDataNode != null)&lt;br /&gt;&amp;nbsp;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;// Get the actual data object&lt;br /&gt;&amp;nbsp;&amp;nbsp;var objDatum = ViewDataNode.GetDatum(objViewDataNode);&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;if (objDatum.IsDirty())&lt;br /&gt;&amp;nbsp;&amp;nbsp;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;// your code here&lt;br /&gt;&amp;nbsp;&amp;nbsp;}&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;// Get the next element&amp;nbsp;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;objViewDataNode = ViewDataNode.FindNext(objViewDataNode);&lt;br /&gt;&amp;nbsp;}&lt;br /&gt;}&lt;/p&gt;
&lt;p&gt;Disclaimer: this is not public OM and so it&amp;#39;s subject to change - use it at your own risk.&lt;br /&gt;Warning: this can be very performance-intensive for large views.&lt;/p&gt;
&lt;p&gt;Let me know if this approach works for you.&lt;/p&gt;</description></item><item><title>Guru Advice: Tracking "IsDirty" with InfoPath Forms Services</title><link>https://www.infopathdev.com:443/forums/thread/26569.aspx</link><pubDate>Mon, 18 Feb 2008 22:28:06 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:26569</guid><dc:creator>eeyore145</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/26569.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=40&amp;PostID=26569</wfw:commentRss><description>&lt;p&gt;I have spent the last few days banging my head against the wall with this one.&amp;nbsp; I am looking for fresh ideas, or maybe a &amp;quot;thinking&amp;quot; outside of the box experienced InfoPath person that might have an idea I can leverage.&lt;/p&gt;
&lt;p align="left"&gt;These are the facts:&lt;/p&gt;
&lt;p align="left"&gt;1) I have a huge InfoPath form which is browser enabled and I am using the XmlFormView control in a custom web part.&amp;nbsp; I have over 500 fields (yes, that many, and about 8 Views).&lt;/p&gt;
&lt;p align="left"&gt;2) We have a make or break requirement which entails being able to track if the form is dirty, or basically if the user tries to navigate away from the current web page we prompt them &amp;quot;The form is not saved, are you sure you want to leave, etc&amp;quot;.&amp;nbsp; Again, this is within a web part zone and I need to figure out a way to resolve isdirty so any navigational link or attempt to close this web part page prompts the user.&lt;/p&gt;
&lt;p align="left"&gt;&lt;u&gt;This is what I&amp;#39;ve thought about/ruled out:&lt;/u&gt;&lt;/p&gt;
&lt;p align="left"&gt;1) Using the Schema_Changed event (or root level&amp;nbsp;node) and the FormState object within managed code at the client object/form level, I can verify when a change occurs.&amp;nbsp; The problem is, I can&amp;#39;t use this.NotifyHost() or a SubmitToHost.Execute() connection, since there has been no postback.&amp;nbsp; This is not a UI button driven event, basically the client object form needs to tell the host or Server, &amp;quot;hey I&amp;#39;m dirty&amp;quot; with no user interaction or button even to drive post back.&amp;nbsp; And there appears to be no way to simulate a button click on an InfoPath form (as a lessor hack of doom...).&lt;/p&gt;
&lt;p align="left"&gt;2) At the browser level, I can write javascript to check some hidden field within the window.onbeforeunload event hander, but the problem is, I have no way to set it, given point 1.&amp;nbsp; Handing the browser prompting is not the issue, its resolving the dirty status.&lt;/p&gt;
&lt;p align="left"&gt;3) I can NOT have every field on the form auto post back to the server (under Browser settings in design view of InfoPath)and leverage a&amp;nbsp; managed code changed event&amp;nbsp; since its over 500 fields, this isn&amp;#39;t practical since the IIS server would lag and every time the user changed a field value, it would re-send to the server, not a good user experience and we just can&amp;#39;t do it.&lt;/p&gt;
&lt;p align="left"&gt;4) Writing javascript to get the client rendered&amp;nbsp; data array (var g_objCurrentFormData) that the XmlFormViewer uses.&amp;nbsp; Basically get the array.ToString() MD5 hash it via javascript and then compare AGAIN against the data array resolved on window unload.&amp;nbsp; Unfortunately, Forms Services scrubs through the data array and makes changes between window.onload and window.beforeunload, so I can&amp;#39;t do this either...&lt;/p&gt;
&lt;p align="left"&gt;So, I&amp;#39;m struggling and I&amp;#39;m not sure how else I can do this.&lt;/p&gt;
&lt;p align="left"&gt;Any ideas?&amp;nbsp; Can I extend Forms Services to use a new post back agent or trigger?&amp;nbsp; Custom javascript that fires when a &amp;quot;tracker field&amp;quot; such as &amp;quot;Dirty_Field_Tracker&amp;quot;&amp;nbsp; is updated to do a postback?&lt;/p&gt;
&lt;p align="left"&gt;Has anyone been able to track the is dirty state of an InfoPath form through InfoPath Forms Services, some way of tracking if the form has changed?&lt;/p&gt;
&lt;p align="left"&gt;Thanks for reading and any ideas are appreciated.&lt;/p&gt;
&lt;p align="left"&gt;MK&lt;/p&gt;</description></item></channel></rss>