Message Box

H

Help Me

I have been trying to find the JScript to pull up a message box i have found.

var theResponse = window.alert("Welcome?","Enter your name here.");

But it keeps telling me tha t window is not reconized. Can you please help.

Thanks
 
A

Andrew Watt [MVP - InfoPath]

I have been trying to find the JScript to pull up a message box i have found.

var theResponse = window.alert("Welcome?","Enter your name here.");

But it keeps telling me tha t window is not reconized. Can you please help.

Thanks

Your code suggests that you are trying to use a JScript alert() for
the purpose of a prompt().

If you simply want to display a message use
XDocument.UI.Alert("This is a message.");

Andrew Watt
MVP - InfoPath
 
Top