hello guys,
could anyone show me how to the value of confirm box with ("or pass the value to") PHP?
ex: confirm("Are you sure you want...")
hope anyone would reply to this...
many tanx again in advanced...
HOW: get the value of confirm message box with PHP?
Moderator: General Moderators
- Kieran Huggins
- DevNet Master
- Posts: 3635
- Joined: Wed Dec 06, 2006 4:14 pm
- Location: Toronto, Canada
- Contact:
by the way, it either returns TRUE or FALSE in javascript. Use something like:
Returning FALSE during the onclick event of an Anchor (<a>) element will cancel the navigation...that's how I use it most often.
Code: Select all
if(confirm('are you sure????')) // do something- CoderGoblin
- DevNet Resident
- Posts: 1425
- Joined: Tue Mar 16, 2004 10:03 am
- Location: Aachen, Germany
If asking for deletion, I tend to create a hidden input field in the form with a value of 1 e.g <input type='text' name='del_conf' value=1 /> when the user confirm the deletion (using javascript). Only when my PHP form processing finds this value does it delete anything. Catering for those people who do not use javascript is another problem,
- Kieran Huggins
- DevNet Master
- Posts: 3635
- Joined: Wed Dec 06, 2006 4:14 pm
- Location: Toronto, Canada
- Contact: