<?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>General</title><link>https://www.infopathdev.com:443/forums/41.aspx</link><description>If you're not sure where to ask your question, ask it here. If necessary, our moderators will make sure it gets classified in the correct board.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Required Controls Left Blank But Can Still Submit</title><link>https://www.infopathdev.com:443/forums/thread/9617.aspx</link><pubDate>Tue, 25 Apr 2006 01:31:21 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:9617</guid><dc:creator>Matt Faus</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/9617.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=9617</wfw:commentRss><description>I would just Google around for a "JavaScript syntax" tutorial and maybe work your way through a couple Hello World programs to get the ball rolling. Other than that, there are several books listed in the Resources section of this website that are recommended by our team.&lt;br /&gt;&lt;br /&gt;Also, you might have a look at using VBScript instead of JScript, it's bent more towards getting the point across instead of getting caught up in syntax errors. VBScript looks lot more like "real sentences" and can sometimes be easier to understand for simple things like the scripts that run behind InfoPath forms.&lt;br /&gt;</description></item><item><title>Re: Required Controls Left Blank But Can Still Submit</title><link>https://www.infopathdev.com:443/forums/thread/9616.aspx</link><pubDate>Mon, 24 Apr 2006 17:54:58 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:9616</guid><dc:creator>CycleFitness</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/9616.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=9616</wfw:commentRss><description>I would really like to be more empowered with creating these solutions on my own.  For someone who understands programming concepts and XML but has no experience with any language or the multiple parts to making XML work, where would I start to learn how to do this?  For example, would general JScript tutorials have taught me about the grouping of the IF condition?  Funny, I wouldn't think that was group, per se, but rather a sequence of events.  We tested for a condition, displayed a dialog, then sent the user back.&lt;br /&gt;&lt;br /&gt;I guess I'm generally inquiring where I should go to get better at InfoPath.  I'm a quick study and can usually backward engineer pretty well.</description></item><item><title>Re: Required Controls Left Blank But Can Still Submit</title><link>https://www.infopathdev.com:443/forums/thread/9615.aspx</link><pubDate>Mon, 24 Apr 2006 17:39:58 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:9615</guid><dc:creator>Stephanie Cantwell</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/9615.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=9615</wfw:commentRss><description>You are welcome, Deb. :-)&lt;br /&gt;&lt;br /&gt;The { }'s are required to group the code to execute for the IF condition.  The code previously would always return after the if statement was executed.&lt;br /&gt;&lt;br /&gt;</description></item><item><title>Re: Required Controls Left Blank But Can Still Submit</title><link>https://www.infopathdev.com:443/forums/thread/9614.aspx</link><pubDate>Mon, 24 Apr 2006 17:31:50 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:9614</guid><dc:creator>CycleFitness</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/9614.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=9614</wfw:commentRss><description>OH!  I was so close! ;-)  Finally!&lt;br /&gt;&lt;br /&gt;I know this seemed elementary to the regulars, but for people like me who aren't developers, we really need simple solutions like this.  This might be a good solution to put on one of the Websites.  Being able to close InfoPath after submission should be a basic function built into the program and not require custom code.&lt;br /&gt;&lt;br /&gt;Thank you, as usual, Stephanie.&lt;br /&gt;&lt;br /&gt;BTW, why would I use the {} rather than ELSE?</description></item><item><title>Re: Required Controls Left Blank But Can Still Submit</title><link>https://www.infopathdev.com:443/forums/thread/9613.aspx</link><pubDate>Mon, 24 Apr 2006 16:21:04 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:9613</guid><dc:creator>Stephanie Cantwell</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/9613.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=9613</wfw:commentRss><description>Try this:&lt;br /&gt;&lt;br /&gt;function CTRL19_5::OnClick(eventObj)&lt;br /&gt;{&lt;br /&gt;	if (XDocument.Errors.Count &amp;gt; 0)&lt;br /&gt;	{&lt;br /&gt;        	XDocument.UI.Alert("Required information is missing as indicated by the red asterisk(s).")&lt;br /&gt;        	return;&lt;br /&gt;	}&lt;br /&gt;	XDocument.Submit()&lt;br /&gt;	Application.ActiveWindow.Close(true);&lt;br /&gt;}&lt;br /&gt;</description></item><item><title>Re: Required Controls Left Blank But Can Still Submit</title><link>https://www.infopathdev.com:443/forums/thread/9612.aspx</link><pubDate>Mon, 24 Apr 2006 14:59:32 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:9612</guid><dc:creator>CycleFitness</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/9612.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=9612</wfw:commentRss><description>Sheesh.  I know nothing about how to program in InfoPath.  I'm pulling from many sources here ... can you help with what's wrong with this syntax?  I get an error at "ELSE""&lt;br /&gt;&lt;br /&gt;function CTRL19_5::OnClick(eventObj)&lt;br /&gt;{&lt;br /&gt;if (XDocument.Errors.Count &amp;gt; 0)&lt;br /&gt;        XDocument.UI.Alert("Required information is missing as indicated by the red asterisk(s).")&lt;br /&gt;       &lt;br /&gt;        return;&lt;br /&gt;else&lt;br /&gt;	XDocument.Submit()&lt;br /&gt;	Application.ActiveWindow.Close(true);&lt;br /&gt;}</description></item><item><title>Re: Required Controls Left Blank But Can Still Submit</title><link>https://www.infopathdev.com:443/forums/thread/9611.aspx</link><pubDate>Mon, 24 Apr 2006 14:50:00 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:9611</guid><dc:creator>Stephanie Cantwell</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/9611.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=9611</wfw:commentRss><description>Sorry, the above reply is not what you are looking for.  Look at this thread instead.&lt;a target="_blank" href=http://www.infopathdev.com/forums/topic.asp?TOPIC_ID=33&gt;http://www.infopathdev.com/forums/topic.asp?TOPIC_ID=33&lt;/a&gt;</description></item><item><title>Re: Required Controls Left Blank But Can Still Submit</title><link>https://www.infopathdev.com:443/forums/thread/9610.aspx</link><pubDate>Mon, 24 Apr 2006 14:33:00 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:9610</guid><dc:creator>Stephanie Cantwell</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/9610.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=9610</wfw:commentRss><description>Hi Deb,&lt;br /&gt;&lt;br /&gt;Check out this thread:&lt;a target="_blank" href=http://www.infopathdev.com/forums/topic.asp?TOPIC_ID=1123&amp;SearchTerms=error&gt;http://www.infopathdev.com/forums/topic.asp?TOPIC_ID=1123&amp;SearchTerms=error&lt;/a&gt;,validation,required,field</description></item><item><title>Re: Required Controls Left Blank But Can Still Submit</title><link>https://www.infopathdev.com:443/forums/thread/9609.aspx</link><pubDate>Mon, 24 Apr 2006 14:14:08 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:9609</guid><dc:creator>CycleFitness</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/9609.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=9609</wfw:commentRss><description>With that need now clear, can someone help me write two pieces of code:&lt;br /&gt;&lt;br /&gt;1)  Check for any errors (required fields without values) and if found, display message 'required information missing', and return user to the form.  If not found, submit the form and close the application.&lt;br /&gt;</description></item><item><title>Re: Required Controls Left Blank But Can Still Submit</title><link>https://www.infopathdev.com:443/forums/thread/9608.aspx</link><pubDate>Mon, 24 Apr 2006 10:43:14 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:9608</guid><dc:creator>AndersR</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/9608.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=9608</wfw:commentRss><description>[OFF-TOPIC]&lt;br /&gt;gratz, scantwell! 0-100 posts in record time ;-)</description></item><item><title>Re: Required Controls Left Blank But Can Still Submit</title><link>https://www.infopathdev.com:443/forums/thread/9607.aspx</link><pubDate>Mon, 24 Apr 2006 06:39:57 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:9607</guid><dc:creator>Stephanie Cantwell</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/9607.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=9607</wfw:commentRss><description>I think Deb is correct.  Close the From action only closes the form itself, not the InfoPath application.  You still need the Application.ActiveWindow.Close(true) to close the application.&lt;br /&gt;</description></item><item><title>Re: Required Controls Left Blank But Can Still Submit</title><link>https://www.infopathdev.com:443/forums/thread/9606.aspx</link><pubDate>Mon, 24 Apr 2006 06:28:15 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:9606</guid><dc:creator>Patrick Halstead</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/9606.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=9606</wfw:commentRss><description>Hi Deb,&lt;br /&gt;Add an action to "Close the Form" after your "submit" action.</description></item><item><title>Re: Required Controls Left Blank But Can Still Submit</title><link>https://www.infopathdev.com:443/forums/thread/9605.aspx</link><pubDate>Sun, 23 Apr 2006 22:01:15 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:9605</guid><dc:creator>CycleFitness</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/9605.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=9605</wfw:commentRss><description>I need the rules so I can get InfoPath to close itself when the user Submits.  The Submit options only support closing the form.  In my case, that causes confusion for the users who don't know anything about InfoPath.&lt;br /&gt;&lt;br /&gt;Is there another way to do this?  If there is, then I can eliminate the code and my form should then behave as I would expect and not allow a user to submit if they haven't provided required field values.  With the code, even if they didn't, it runs the code and closes the app.&lt;br /&gt;&lt;br /&gt;Thanks, Patrick.</description></item><item><title>Re: Required Controls Left Blank But Can Still Submit</title><link>https://www.infopathdev.com:443/forums/thread/9604.aspx</link><pubDate>Sat, 22 Apr 2006 05:51:14 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:9604</guid><dc:creator>Patrick Halstead</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/9604.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=9604</wfw:commentRss><description>Hi Deb,&lt;br /&gt;I thought you were trying to do both code/rules from the button properties dialog. I didn't realize you had already defined an OnClick handler. In that case, yes, they will both run, as Greg says. I really think you're better off just doing rules. Why do you need code?</description></item><item><title>Re: Required Controls Left Blank But Can Still Submit</title><link>https://www.infopathdev.com:443/forums/thread/9603.aspx</link><pubDate>Fri, 21 Apr 2006 23:00:55 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:9603</guid><dc:creator>CycleFitness</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/9603.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=9603</wfw:commentRss><description>I've given this a college try -- searching the InfoPath TechNet forum and looking at the Developer's reference.  Something like this would work, I guess, but I have the syntax all wrong:&lt;br /&gt;&lt;br /&gt;function CTRL19_5::OnClick(eventObj)&lt;br /&gt;{&lt;br /&gt;if (XDocument.Errors.Count &amp;gt;; 0)&lt;br /&gt;        XDocument.UI.Alert("Required information is missing.")&lt;br /&gt;        return&lt;br /&gt;else&lt;br /&gt;	XDocument.Submit()&lt;br /&gt;	Application.ActiveWindow.Close(true);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;How would I fix this to work?</description></item></channel></rss>