Link to home
Start Free TrialLog in
Avatar of zintech
zintech

asked on

How do I do a simple alert box in JScript?

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();
Avatar of Shaun Kline
Shaun Kline
Flag of United States of America image

Have you tried window.alert as it says on Microsoft's website?
http://msdn.microsoft.com/en-us/library/9fd9ehx9%28VS.71%29.aspx
ASKER CERTIFIED SOLUTION
Avatar of Shaun Kline
Shaun Kline
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of zintech
zintech

ASKER

Yes I did that before and just now, I get an error message that "window" is undefined
Avatar of zintech

ASKER

Got it.  The correct code is:

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

Thanks very much Shaun!