How do I do a simple alert box in JScript?

zintech
zintech used Ask the Experts™
on
I am trying to do a simple pop up box to debug JScript code.  This is NOT JavaScript.  alert("Message") does NOT work.  I am doing this in code for InfoPath 2007.  Some of the code looks like:

var oQueryId
      oQueryId = XDocument.DOM.selectSingleNode("/dfs:myFields/dfs:queryFields/q:databasename/@VendName").text;
      myDataAdapter = XDocument.DataAdapters("SecondaryDataSource");
      myDataAdapter.Command = "select * from databasename WHERE VendName LIKE " + "'%" + oQueryId + "%'";
      myDataAdapter.Query();
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Shaun KlineLead Software Engineer

Commented:
Have you tried window.alert as it says on Microsoft's website?
http://msdn.microsoft.com/en-us/library/9fd9ehx9%28VS.71%29.aspx
Lead Software Engineer
Commented:
Or there is this reference specific to InfoPath: http://support.microsoft.com/kb/827002

Author

Commented:
Yes I did that before and just now, I get an error message that "window" is undefined

Author

Commented:
Got it.  The correct code is:

XDocument.UI.Alert("This is a test.");

Thanks very much Shaun!

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial