Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8970727
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T17:46:42+00:00 2026-06-15T17:46:42+00:00

I am trying to control a form submit confirmation using a Fancybox confirmation message.

  • 0

I am trying to control a form submit confirmation using a Fancybox confirmation message.

How can I add an event to the form submit using jQuery fancybox?

my form source is bellow:

<form name="oactivite" action="url" method="POST" onsubmit="return confirmTask(' do you confirm task : '+document.forms['oactivite'].elements['task_id'].options[this.document.forms['oactivite'].elements['task_id'].selectedIndex].text+'?');">
    <select name="task_id" id="task_id">
        <option value="1">Pause</option>
        <option value="2">Digit</option>
        <option value="3">editing</option>
    </select>
    <div name="emp_id" value="20" style="display:none" />
    <input type="submit" value="validate task"/>
  </form>

how can i show a fancybox confirm message when i call confirmTask ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T17:46:43+00:00Added an answer on June 15, 2026 at 5:46 pm

    You should show us some of your code, but hopefully this helps. Fancy box has a method to open the lightbox, you can call that on the form submit like so:

    $('#myform').submit(function() {
        $("#myfancybox").trigger('click');
        return false; // prevents form from submitting
    });
    

    You can then put another element (for example, your confirm button) which then calls the form submit:

    $('#confirmbutton').click(function() {
        $('#myform').submit();
    });
    

    See the tips and tricks section on fancy box for reference

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to auto submit form using webbrowser control. I am using the
I'm trying to add a file upload control to my ASP.NET MVC 2 form
I am new to WPF and trying to implement validation control on submit form.
I am trying to implement ajax in jsp(avoid form submit) using struts2. I used
I am trying to fire a form submit via jQuery and have a particular
I am trying to submit a form using Ajax.Updater and have the result of
I am trying to upload images on a form but I am using Jquery
I'm trying to submit my form to controller using ajax and display ajax response
I am trying to intercept form submits from webpages I dont control. My current
I am trying to create a form with webbrowser control. I am trying to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.