<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Invalid Flashing Fields 2.0</title>
	<atom:link href="http://forms.stefcameron.com/2006/08/15/invalid-flashing-fields-20/feed/" rel="self" type="application/rss+xml" />
	<link>http://forms.stefcameron.com/2006/08/15/invalid-flashing-fields-20/</link>
	<description>Building intelligent forms using Adobe LiveCycle Designer</description>
	<lastBuildDate>Thu, 19 Jan 2012 16:32:12 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Stefan Cameron</title>
		<link>http://forms.stefcameron.com/2006/08/15/invalid-flashing-fields-20/#comment-5389</link>
		<dc:creator>Stefan Cameron</dc:creator>
		<pubDate>Tue, 06 Jan 2009 02:15:14 +0000</pubDate>
		<guid isPermaLink="false">http://forms.stefcameron.com/blog/?p=33#comment-5389</guid>
		<description>Xancholy,

My colleague John Brinkman has a great 3-part series on good practices for &lt;a href=&quot;http://blogs.adobe.com/formfeed/2008/10/build_a_better_exclusion_group.html&quot; rel=&quot;nofollow&quot;&gt;validating exclusion groups&lt;/a&gt; (radio button lists).

As far as making them flash, both the radio button lists and the fields (radio buttons) they contain have the fillColor scripting property (in XFA 2.8 at least) so you can set either the background of the entire list or just a single radio button within it if you want.</description>
		<content:encoded><![CDATA[<p>Xancholy,</p>
<p>My colleague John Brinkman has a great 3-part series on good practices for <a href="http://blogs.adobe.com/formfeed/2008/10/build_a_better_exclusion_group.html" rel="nofollow">validating exclusion groups</a> (radio button lists).</p>
<p>As far as making them flash, both the radio button lists and the fields (radio buttons) they contain have the fillColor scripting property (in XFA 2.8 at least) so you can set either the background of the entire list or just a single radio button within it if you want.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Xancholy</title>
		<link>http://forms.stefcameron.com/2006/08/15/invalid-flashing-fields-20/#comment-5388</link>
		<dc:creator>Xancholy</dc:creator>
		<pubDate>Tue, 23 Dec 2008 16:47:58 +0000</pubDate>
		<guid isPermaLink="false">http://forms.stefcameron.com/blog/?p=33#comment-5388</guid>
		<description>Hi Stefan,

Thanks for this great example. Please can you show me how to
validate a RadioButtonList &amp;
flash it if nothing selected ?

Thanks !</description>
		<content:encoded><![CDATA[<p>Hi Stefan,</p>
<p>Thanks for this great example. Please can you show me how to<br />
validate a RadioButtonList &amp;<br />
flash it if nothing selected ?</p>
<p>Thanks !</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stefan Cameron</title>
		<link>http://forms.stefcameron.com/2006/08/15/invalid-flashing-fields-20/#comment-5387</link>
		<dc:creator>Stefan Cameron</dc:creator>
		<pubDate>Sat, 20 Dec 2008 20:52:55 +0000</pubDate>
		<guid isPermaLink="false">http://forms.stefcameron.com/blog/?p=33#comment-5387</guid>
		<description>Michael,

When you use app.setTimeOut, you should be giving a String as the first parameter. This string is the script that is to be evaluated, after the set period of time, &lt;strong&gt;in the context of the document (i.e. Acrobat Doc object) from which the time-out was set&lt;/strong&gt;.

When you simply do

&lt;pre&gt;&lt;code&gt;app.setTimeOut(&quot;myFunction();&quot;, 3000);&lt;/code&gt;&lt;/pre&gt;

nothing happens because the &quot;myFunction()&quot; is defined in the script object that&#039;s in the XFA portion of the PDF document, not in the PDF document&#039;s script space.

In order to hit your script object function, you need to access it via the document&#039;s &lt;strong&gt;xfa&lt;/strong&gt; property which is the gateway into the XFA form that&#039;s inside the PDF document. From there, you go into the Form DOM and from there, you specify the SOM expression from the root subform down to the function in your script object.

For example, say you have a script object called &quot;MyScripts&quot; that&#039;s in the root subform, named &quot;form1&quot;. In MyScripts, there&#039;s a function called &quot;foo()&quot; which you want to execute after 1 second. You would do this:

&lt;pre&gt;&lt;code&gt;app.setTimeOut(&quot;xfa.form.form1.MyScripts.foo();&quot;, 1000);&lt;/code&gt;&lt;/pre&gt;

After 1 second, any code you have in foo() would be executed.

Note: I&#039;ve only tried this with Acrobat 9 Pro and frankly, I was surprised it actually worked because I had always thought one couldn&#039;t postpone the execution of a script object function -- I&#039;m going to have to post about this after my break! The JavaScript for Acrobat 9 Reference &lt;a href=&quot;http://livedocs.adobe.com/acrobat_sdk/9/Acrobat9_HTMLHelp/JS_API_AcroJS.88.429.html&quot; rel=&quot;nofollow&quot;&gt;claims&lt;/a&gt; that the xfa property is available since Acrobat/Reader 6.0.2.</description>
		<content:encoded><![CDATA[<p>Michael,</p>
<p>When you use app.setTimeOut, you should be giving a String as the first parameter. This string is the script that is to be evaluated, after the set period of time, <strong>in the context of the document (i.e. Acrobat Doc object) from which the time-out was set</strong>.</p>
<p>When you simply do</p>
<pre><code>app.setTimeOut("myFunction();", 3000);</code></pre>
<p>nothing happens because the &#8220;myFunction()&#8221; is defined in the script object that&#8217;s in the XFA portion of the PDF document, not in the PDF document&#8217;s script space.</p>
<p>In order to hit your script object function, you need to access it via the document&#8217;s <strong>xfa</strong> property which is the gateway into the XFA form that&#8217;s inside the PDF document. From there, you go into the Form DOM and from there, you specify the SOM expression from the root subform down to the function in your script object.</p>
<p>For example, say you have a script object called &#8220;MyScripts&#8221; that&#8217;s in the root subform, named &#8220;form1&#8243;. In MyScripts, there&#8217;s a function called &#8220;foo()&#8221; which you want to execute after 1 second. You would do this:</p>
<pre><code>app.setTimeOut("xfa.form.form1.MyScripts.foo();", 1000);</code></pre>
<p>After 1 second, any code you have in foo() would be executed.</p>
<p>Note: I&#8217;ve only tried this with Acrobat 9 Pro and frankly, I was surprised it actually worked because I had always thought one couldn&#8217;t postpone the execution of a script object function &#8212; I&#8217;m going to have to post about this after my break! The JavaScript for Acrobat 9 Reference <a href="http://livedocs.adobe.com/acrobat_sdk/9/Acrobat9_HTMLHelp/JS_API_AcroJS.88.429.html" rel="nofollow">claims</a> that the xfa property is available since Acrobat/Reader 6.0.2.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael</title>
		<link>http://forms.stefcameron.com/2006/08/15/invalid-flashing-fields-20/#comment-5386</link>
		<dc:creator>Michael</dc:creator>
		<pubDate>Thu, 18 Dec 2008 21:58:09 +0000</pubDate>
		<guid isPermaLink="false">http://forms.stefcameron.com/blog/?p=33#comment-5386</guid>
		<description>Ok Stefan, I really need your help here.  I&#039;ve been trying to get the app.setTimeOut method to work to no avail.  I&#039;ve tried accessing a script object that I have many functions in with no success.  Then I just tried to place functions into the script where I editing thinking that maybe because the script object is part of the xfa form object I couldn&#039;t access them through the app object,(or I was just using the wrong syntax) so that maybe if I placed the functions onto the same script and called them from there via:
app.setTimeOut(&quot;myFunction()&quot;,3000);
No dice.  I&#039;ve tried all kinds of arrangements in quotations, (single quotes, double quotes, no quotes, etc.) and nothing.  What I&#039;m trying to do is have a web service perform a query and bring back a string from the database if an object is found, then I&#039;d like for Acrobat to wait for a prescribed time before checking if the database actually returned a string value, or if it did not and display a message indicating that either it did return something or it did not.
I know that the app.SetTimeOut can see the function call I&#039;m making, because when I wasn&#039;t using quotes around the function (in the setTimeOut method) It was immediately displaying the messages.  But when I put quotes around it nothing happens.  Can you help me?</description>
		<content:encoded><![CDATA[<p>Ok Stefan, I really need your help here.  I&#8217;ve been trying to get the app.setTimeOut method to work to no avail.  I&#8217;ve tried accessing a script object that I have many functions in with no success.  Then I just tried to place functions into the script where I editing thinking that maybe because the script object is part of the xfa form object I couldn&#8217;t access them through the app object,(or I was just using the wrong syntax) so that maybe if I placed the functions onto the same script and called them from there via:<br />
app.setTimeOut(&#8220;myFunction()&#8221;,3000);<br />
No dice.  I&#8217;ve tried all kinds of arrangements in quotations, (single quotes, double quotes, no quotes, etc.) and nothing.  What I&#8217;m trying to do is have a web service perform a query and bring back a string from the database if an object is found, then I&#8217;d like for Acrobat to wait for a prescribed time before checking if the database actually returned a string value, or if it did not and display a message indicating that either it did return something or it did not.<br />
I know that the app.SetTimeOut can see the function call I&#8217;m making, because when I wasn&#8217;t using quotes around the function (in the setTimeOut method) It was immediately displaying the messages.  But when I put quotes around it nothing happens.  Can you help me?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael</title>
		<link>http://forms.stefcameron.com/2006/08/15/invalid-flashing-fields-20/#comment-5385</link>
		<dc:creator>Michael</dc:creator>
		<pubDate>Fri, 12 Dec 2008 16:52:45 +0000</pubDate>
		<guid isPermaLink="false">http://forms.stefcameron.com/blog/?p=33#comment-5385</guid>
		<description>Thanks for the quick reply.  I was attempting to access a  ScriptObject which held some of my functions in them, through the app.setTimeOut method, and was unable to do so.  I kept getting &#039;ScriptObject&#039; not defined&#039; in the console.  What is the proper syntax for using app.setTimeOut with functions in the script object?</description>
		<content:encoded><![CDATA[<p>Thanks for the quick reply.  I was attempting to access a  ScriptObject which held some of my functions in them, through the app.setTimeOut method, and was unable to do so.  I kept getting &#8216;ScriptObject&#8217; not defined&#8217; in the console.  What is the proper syntax for using app.setTimeOut with functions in the script object?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stefan Cameron</title>
		<link>http://forms.stefcameron.com/2006/08/15/invalid-flashing-fields-20/#comment-5384</link>
		<dc:creator>Stefan Cameron</dc:creator>
		<pubDate>Fri, 12 Dec 2008 01:13:02 +0000</pubDate>
		<guid isPermaLink="false">http://forms.stefcameron.com/blog/?p=33#comment-5384</guid>
		<description>Michael,

app.setTimeOut() is typically how you would do this but how easy it is and what you can do depends on the version of Acrobat/Reader you&#039;re running. If it&#039;s 7.0.5 or later, then the Acrobat Doc object exposes the global xfa object which is the gateway into the XFA form inside the PDF (as in the sample in this post). If you wanted to set the fill color of a field 3 seconds after clicking on a button, you would do something like this:

&lt;pre&gt;&lt;code&gt;app.setTimeOut(&#039;xfa.form.rootSubform.myField.fillColor = &quot;255,0,0&quot;;&#039;, 3000);&lt;/code&gt;&lt;/pre&gt;

Note that when the timer fires, the code is executed in the context of the document from which the time-out was set.</description>
		<content:encoded><![CDATA[<p>Michael,</p>
<p>app.setTimeOut() is typically how you would do this but how easy it is and what you can do depends on the version of Acrobat/Reader you&#8217;re running. If it&#8217;s 7.0.5 or later, then the Acrobat Doc object exposes the global xfa object which is the gateway into the XFA form inside the PDF (as in the sample in this post). If you wanted to set the fill color of a field 3 seconds after clicking on a button, you would do something like this:</p>
<pre><code>app.setTimeOut('xfa.form.rootSubform.myField.fillColor = "255,0,0";', 3000);</code></pre>
<p>Note that when the timer fires, the code is executed in the context of the document from which the time-out was set.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael</title>
		<link>http://forms.stefcameron.com/2006/08/15/invalid-flashing-fields-20/#comment-5383</link>
		<dc:creator>Michael</dc:creator>
		<pubDate>Fri, 12 Dec 2008 00:32:31 +0000</pubDate>
		<guid isPermaLink="false">http://forms.stefcameron.com/blog/?p=33#comment-5383</guid>
		<description>Hi  Stefan - I&#039;m just trying to creating a timer that will make some JavaScript code wait 3 seconds before running.  Can I do this using the app.setTimeOut method?  If so how?

Thanks

BTW Great post.</description>
		<content:encoded><![CDATA[<p>Hi  Stefan &#8211; I&#8217;m just trying to creating a timer that will make some JavaScript code wait 3 seconds before running.  Can I do this using the app.setTimeOut method?  If so how?</p>
<p>Thanks</p>
<p>BTW Great post.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stefan Cameron</title>
		<link>http://forms.stefcameron.com/2006/08/15/invalid-flashing-fields-20/#comment-5382</link>
		<dc:creator>Stefan Cameron</dc:creator>
		<pubDate>Thu, 24 Aug 2006 19:06:14 +0000</pubDate>
		<guid isPermaLink="false">http://forms.stefcameron.com/blog/?p=33#comment-5382</guid>
		<description>Michael,

Your question prompted a new post on my blog with a sample on how to do complex validations prior to submitting a form. See &lt;a href=&quot;http://blogs.adobe.com/formbuilder/2006/08/complex_validations.html&quot; rel=&quot;nofollow&quot;&gt;Complex Validations&lt;/a&gt;.

As for reusing script across different forms, that&#039;s possible by using a combination of script objects, subforms and the Library palette: Place a subform on the form and, in the Hierarchy palette, right-click on the subform you just inserted and select &lt;i&gt;Insert Script Object&lt;/i&gt;. Then, select the script object and give it a name and use the Script Editor to write script (note that only JavaScript may be used in script objects). Once you&#039;re finished, make the subform invisible using the Object palette&#039;s Subform tab and drag the subform to the Library palette. That&#039;ll create a new object in the Library that you can drag and drop onto any form. Say you named the subform &quot;Subform1&quot; and the script object &quot;ScriptObject&quot;, you would when access the script by writing a JavaScript (on a button&#039;s Click event, for example) with a statement like &quot;Subform1.ScriptObject.MyFunction();&quot;

The problem with that approach is that if you need to modify the scripts in the script object, you&#039;ll have to go back and fix all the forms that use it because dragging and dropping from the Library onto a form create a &lt;b&gt;copy&lt;/b&gt; of that object -- not a reference.

Since I&#039;m quite certain you&#039;re looking for a reference rather than a copy, I&#039;ll have to ask you to be a little patient because it&#039;s possible we may address that issue in a future release.</description>
		<content:encoded><![CDATA[<p>Michael,</p>
<p>Your question prompted a new post on my blog with a sample on how to do complex validations prior to submitting a form. See <a href="http://blogs.adobe.com/formbuilder/2006/08/complex_validations.html" rel="nofollow">Complex Validations</a>.</p>
<p>As for reusing script across different forms, that&#8217;s possible by using a combination of script objects, subforms and the Library palette: Place a subform on the form and, in the Hierarchy palette, right-click on the subform you just inserted and select <i>Insert Script Object</i>. Then, select the script object and give it a name and use the Script Editor to write script (note that only JavaScript may be used in script objects). Once you&#8217;re finished, make the subform invisible using the Object palette&#8217;s Subform tab and drag the subform to the Library palette. That&#8217;ll create a new object in the Library that you can drag and drop onto any form. Say you named the subform &#8220;Subform1&#8243; and the script object &#8220;ScriptObject&#8221;, you would when access the script by writing a JavaScript (on a button&#8217;s Click event, for example) with a statement like &#8220;Subform1.ScriptObject.MyFunction();&#8221;</p>
<p>The problem with that approach is that if you need to modify the scripts in the script object, you&#8217;ll have to go back and fix all the forms that use it because dragging and dropping from the Library onto a form create a <b>copy</b> of that object &#8212; not a reference.</p>
<p>Since I&#8217;m quite certain you&#8217;re looking for a reference rather than a copy, I&#8217;ll have to ask you to be a little patient because it&#8217;s possible we may address that issue in a future release.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael Ramirez</title>
		<link>http://forms.stefcameron.com/2006/08/15/invalid-flashing-fields-20/#comment-5381</link>
		<dc:creator>Michael Ramirez</dc:creator>
		<pubDate>Tue, 22 Aug 2006 19:13:58 +0000</pubDate>
		<guid isPermaLink="false">http://forms.stefcameron.com/blog/?p=33#comment-5381</guid>
		<description>How would you apply complex validation rules to a pdf docuemnt. For example, field A cannot be blank if fields B &amp; C are filled or field E is checked. Can you reuse validation libraries across different forms?</description>
		<content:encoded><![CDATA[<p>How would you apply complex validation rules to a pdf docuemnt. For example, field A cannot be blank if fields B &#038; C are filled or field E is checked. Can you reuse validation libraries across different forms?</p>
]]></content:encoded>
	</item>
</channel>
</rss>

