These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

messagebox having yes no button

d_simmi
Registered: Jul 2 2008
Posts: 4

In my asp.net application i have written a javascript function to display
messagebox having yes no button .
heres the code:
function showmessage()
{
var a=app.alert("do you want to save?", 2, 2, "save");
if (a==4)
{
//do something
}
}

when i execute my application on button click which calls this function, i get an error 'app' undefined.

I tried a lot but not getting the solution. Please tell why its raising error and how it can be solved. Please reply at the earliest.

Thanks in advance.

aerokhin
Registered: Jun 27 2008
Posts: 39
The following javascript code should be working:

var a=xfa.host.messageBox("do you want to save?", "save", 2, 2);
if (a==4)
{
//do something
}
d_simmi
Registered: Jul 2 2008
Posts: 4
Thanks for your reply but still its not showing up messagebox instead giving error xfa undefined. Please tell what are other ways to do it.