Jump to content


Photo

Windows for Decision making


  • Please log in to reply
5 replies to this topic

#1 lucerias

lucerias
  • Members
  • PipPipPip
  • Advanced Member
  • 101 posts

Posted 30 October 2006 - 01:08 PM

What is the code for popping up one windows and if user select "yes" then do some action, if "no" then nothing will happen? Thank you.

#2 gmwebs

gmwebs
  • Members
  • PipPipPip
  • Advanced Member
  • 174 posts
  • LocationLondon

Posted 30 October 2006 - 01:18 PM

Well if you are using a form, then you could do this...

<form action="../scripts/sitemaint.php" method="post" name="delgallery_form" onSubmit="return confirm('Are you sure? This will delete ALL photos contained in the gallery too...');">

What will happen is that when the user clicks on the submit button, a window will pop up with the above message, and if the user clicks YES, then it will submit the form, if the user clicks NO, then nothing happens.

#3 lucerias

lucerias
  • Members
  • PipPipPip
  • Advanced Member
  • 101 posts

Posted 30 October 2006 - 01:35 PM

It is not a form with HTML structure, it is merely a button created by PHP, and i need that button to trigger something, may i know how to do it, thank you.

#4 gmwebs

gmwebs
  • Members
  • PipPipPip
  • Advanced Member
  • 174 posts
  • LocationLondon

Posted 30 October 2006 - 01:37 PM

Can you post your code?

#5 lucerias

lucerias
  • Members
  • PipPipPip
  • Advanced Member
  • 101 posts

Posted 30 October 2006 - 01:46 PM

[$buttons = "<tr><td><input title='".$strings[EDIT_BUTTON_TITLE']."' accessKey='".$strings[EDIT_BUTTON_KEY']."' class='button' onclick=\"this.form.return_module.value='Customers'; this.form.return_action.value='NormalView'; this.form.return_id.value='$focus->id'; this.form.action.value='EditView'\" type='submit' name='Edit' value='  ".$strings['EDIT_BUTTON_LABEL']."  '></td></tr>\n";


#6 fenway

fenway
  • Staff Alumni
  • MySQL Si-Fu / PHP Resident Alien
  • 16,199 posts
  • LocationToronto, ON

Posted 30 October 2006 - 05:22 PM

Depending on how much you care, you could always use confirm().
Seriously... if people don't start reading this before posting, I'm going to consider not answering at all.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users