Skip to main content
June 3, 2009
Answered

Popuing up a confirm message box upon form submission PhP

  • June 3, 2009
  • 2 replies
  • 670 views

Hi everyone,

I am creating a web based application for managing support tickets.So, whenever user closes the ticket by submitting a form, I want to have a confirm message box popped up( yes/no). Depeneding upon the choice, the form should be either processed or not processed.I know this can be done using java script, but I am not very sure how to do it.I am using PHP and mysql. I would really appreciate if someone can help me out with this.

Thanks

This topic has been closed for replies.
Correct answer

Hi,

The html should looks like something similat

<input type="Submit" name="Close" value="Close ticket"
onClick="return confirmClose()">

the corresponding  js function is

function confirmClose ()
{
var close=confirm("Are you sure you wish to close ticket?");
if (close)
     return true ;
else
     return false ;
}
Regards


2 replies

June 4, 2009

Thanks a lot man,it works!

Correct answer
June 4, 2009

Hi,

The html should looks like something similat

<input type="Submit" name="Close" value="Close ticket"
onClick="return confirmClose()">

the corresponding  js function is

function confirmClose ()
{
var close=confirm("Are you sure you wish to close ticket?");
if (close)
     return true ;
else
     return false ;
}
Regards