Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Other Office > Infopath
|
Infopath Programming and automation discussions only please. :)
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Infopath section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 29th, 2005, 04:40 AM
Registered User
 
Join Date: Dec 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Save Form in a directory (2)

I would like to give more information about my problem I have posted yesterday

I have built this function (JScript)for saving form by clicking on a button, like described in the book Professionnal InfoPath 2003, chap.7, page 114. I have still an error, the form is not saved in my directory:

function SaveBtn::OnClick(eventObj)
{
    try
    {
     XDocument.SaveAs("C:\Temp\MyForm1.xml")
     eventObj.ReturnStatus = true;
    }
    catch(e)
    {
     eventObj.ReturnStatus = false;
    }
}

I hope someone can help me.
Best regards.

 
Old September 29th, 2006, 06:15 AM
Authorized User
 
Join Date: Sep 2006
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi,
I really don't know JScript but I would suggest putting a text box pop-up into the exception catch (catch(e)) so that you can see if the 'try' is actually working or if it's just jumping straight out to the exception.
I presume you have a directory at C:\Temp (possibly case-sensitivte???)?
Hope this helps, but as I said I'm no JScript expert!!
Cheers






Similar Threads
Thread Thread Starter Forum Replies Last Post
how to save form Omomani Infopath 0 January 3rd, 2008 06:15 AM
Save Form in a directory zaphi Infopath 0 December 28th, 2005 05:14 AM
html form - save help bunnyhead HTML Code Clinic 2 January 24th, 2005 05:55 AM
Form ALWAYS asks to save changes mmcdonal Access 3 December 7th, 2004 11:58 AM
How do you save a form as is? flyingfox VB.NET 1 May 21st, 2004 03:47 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.