[solved]Msgbox with Yes/No

Problems with the Windows version of XAMPP, questions, comments, and anything related.

[solved]Msgbox with Yes/No

Postby mickeymouse » 19. February 2012 22:03

I usually use 'alert' to give information messages but now I would like to give a message with a Yes/No answer.

I tried:
{var x = msgbox(\"Are you sure you want to AMEND?\",4,\"Precaution Message.\")
if (x==6){return true;}
else{return false;}
}

but it doesn't work. I don't get a message at all.

Thanks
mickeymouse
 
Posts: 42
Joined: 08. March 2009 06:10
Location: France & Canada
Operating System: Win 7 Family Prem Ed (64 bit?)

Re: Msgbox with Yes/No

Postby mickeymouse » 20. February 2012 00:22

OK. I found the answer which is as follows (for the benefit of other users):

{var r=confirm(\"Are you sure you want to AMEND?\");
if (r==true) {return true};
else {return false;}}
mickeymouse
 
Posts: 42
Joined: 08. March 2009 06:10
Location: France & Canada
Operating System: Win 7 Family Prem Ed (64 bit?)


Return to XAMPP for Windows

Who is online

Users browsing this forum: JJ_Tagy and 36 guests