Message box YES NO

Links for php scripts

Moderators: egami, macek, gesf

Post Reply
exoskeleton
New php-forum User
New php-forum User
Posts: 7
Joined: Mon Jun 25, 2012 1:21 am

Thu Jul 05, 2012 12:02 am

masters good day... im using php.. can you help me with message box YES/NO?

i had tride alert ("do you want to delete?");

i know there is something missing to show the buttons YES and NO... can you help me guys ?

tnx in advance..

User avatar
Nullsig
php-forum Fan User
php-forum Fan User
Posts: 979
Joined: Thu Feb 17, 2011 6:52 am
Location: Racine, WI

Thu Jul 05, 2012 6:51 am

Sadly this is not handled by default in JavaScript. You only have the choice of using the OK Cancel message box for prompts.

There is an option to handle customized buttons using a JQuery library. You could also create an overlay using CSS JavaScript and HTML that will allow you to create fully customizable "Message Boxes".

exoskeleton
New php-forum User
New php-forum User
Posts: 7
Joined: Mon Jun 25, 2012 1:21 am

Thu Jul 05, 2012 9:53 pm

i see.. thank you sir Nullsig... how can i put this OK Cancel buttons in jscript? ill take that ... thank you in advance...

User avatar
Nullsig
php-forum Fan User
php-forum Fan User
Posts: 979
Joined: Thu Feb 17, 2011 6:52 am
Location: Racine, WI

Fri Jul 06, 2012 8:28 am

Code: Select all

<script type="text/javascript">
var r=confirm("Press a button");
if (r==true)
  {
  x="You pressed OK!";
  }
else
  {
  x="You pressed Cancel!";
  } 
</script>

Post Reply