Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
0

Popuing up a confirm message box upon form submission PhP

Guest
Jun 03, 2009 Jun 03, 2009

Copy link to clipboard

Copied

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

TOPICS
Server side applications

Views

628
Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jun 03, 2009 Jun 03, 2009

Copy link to clipboard

Copied

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


Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jun 03, 2009 Jun 03, 2009

Copy link to clipboard

Copied

LATEST

Thanks a lot man,it works!

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines