Browser compatible MessageBox.Show() alternative? - InfoPath Dev
in

InfoPath Dev

Browser compatible MessageBox.Show() alternative?

Last post 10-23-2008 12:13 PM by Bhavesh. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 06-05-2008 08:35 AM

    Browser compatible MessageBox.Show() alternative?

    I want to make my form web compatible but have some custom code in C# which uses MessageBox.Show() notifications from System.Windows.Forms to notify the user if something has gone wrong or if they have entered an invalid value. Unfortunately the DesignChecker flags all occurances of these as a 'Unsupported feature in code'. What can I replace it with that is browser-friendly and does the same job?

  • 06-05-2008 12:17 PM In reply to

    Re: Browser compatible MessageBox.Show() alternative?

    Yah there is no popup option in the browser.

    What I have done for alerts and messaging like this is to create a hidden section and a message field.

    When the field is set with text then it becomes visible and has some coloration to draw attention.

    Not quite the same, but effective to place it adjacent to the submit buttons and to post validation messages.

  • 06-06-2008 01:53 AM In reply to

    Re: Browser compatible MessageBox.Show() alternative?

    Thanks Clay, that's a good idea but I can't figure out how to show and hide textfields in code. I'm referencing it like this:

    XPathNavigator txtError = this.CreateNavigator().SelectSingleNode("/my:myFields/my:txtError", this.NamespaceManager);

     I'm looking for something like txtError.Show() or txtError.Hide() but I can't see anything like that.
     

  • 10-23-2008 12:13 PM In reply to

    • Bhavesh
    • Top 500 Contributor
      Male
    • Joined on 05-01-2008
    • Atlanta
    • Posts 40

    Re: Browser compatible MessageBox.Show() alternative?

    HI,

    You can set conditional formatting for the text fields which u want to display and hide based on some flag field in the data source. e.g You can add a field in the data source of type boolean. When you click some button and want to display the message, set the hidden flag to true on button click, so based on the flag's value the field will b visible to the user.

    Bhavesh

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