Display message box when InfoPath 2003 button clicked - InfoPath Dev
in

InfoPath Dev

Display message box when InfoPath 2003 button clicked

Last post 04-24-2007 11:53 AM by Shiva. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 04-24-2007 03:27 AM

    Display message box when InfoPath 2003 button clicked

    I have a button on my form that saves the form back to the document library. This works through 'code behind', i.e.:

     function CTRL29_5::OnClick(eventObj)

    {

    XDocument.Save();

    }

    (the code is JavaScript). How can I make this function display a message box that tells the user something like "the form has been successfully saved"?

    Mark.

  • 04-24-2007 03:35 AM In reply to

    Re: Display message box when InfoPath 2003 button clicked

    Hi,

    Write below code in that function.

    XDocument.UI.Alert("The form has been successfully saved");

    It will work for you.

    K.Ramana Reddy / http://www.ggktech.com
    India.
  • 04-24-2007 11:53 AM In reply to

    • Shiva
    • Top 25 Contributor
    • Joined on 04-15-2005
    • India
    • Posts 694

    Re: Display message box when InfoPath 2003 button clicked

    Hi Markperry,

     

    If you want to give success and failure message then you can use below the code in button onClick event

     

    try

    {

    XDocument.Save();

    //Gives the success message          

    XDocument.UI.Alert("The form has been successfully saved");

    }

    catch(Exception ex)

    {

    //Gives the failure message

    XDocument.UI.Alert(ex.Message);

    }
Page 1 of 1 (3 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.