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

  • Home
  • SEARCH
  • 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 8885659
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T21:21:52+00:00 2026-06-14T21:21:52+00:00

How can I implement the jQueryUI Dialog as a confirm dialog box? Current code:

  • 0

How can I implement the jQueryUI Dialog as a confirm dialog box?

Current code:

$("#formular_submit").button().click(function () {
    var meinArray = []; //ein neues Array definieren für die <a href> links
    var say = $("[value='1']:checked").length;
    //Wenn kein Checkbox gesetzt ist, Fehler Meldung
    if (say == 0) {
        alert("Bitte waehlen Sie eine aus.");
        return false;
    }
    //Wenn ein oder mehere gewählt...    
    if (say >= 1) {
        $("[value='1']:checked").each(function () {
            //Alle Links mit "Title" versehen sind, in link Variable
            var link = $("a#links_jquery").attr('title');
            //Alle Werte, die im "link" gespeicher sind, hängt man an das Array an(mit push Method)
            meinArray.push(link);
        });
        //Ausgabe mit Return, mach das, ansonsten False
        return confirm("Möchten Sie wirklich diese News löschen : " + meinArray);
    }
    return false;
}); //formular_submitFunction END
​

This is an example: http://jsfiddle.net/aldimeola1122/9MnGh/

How can I do that?

Thanks in advance.

  • 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-14T21:21:53+00:00Added an answer on June 14, 2026 at 9:21 pm

    To implement a jQueryUI Dialog as a confirm, you need to cancel the click event on your submit button and implement a handler on your “Confirm” button that submits the form.

    Here’s an example (with an updated fiddle to see it in action):

    $(document).ready(function() {
        $("#formular_submit").button().click(function(e) {
            var say = $("[value='1']:checked").length,
                d = $('<div />'),
                p = $('<p />'),
                ul = $('<ul />'),
                li = $('<li />');
    
            //Wenn kein Checkbox gesetzt ist, Fehler Meldung
            if (say === 0) {
                d.append(p.clone().text('Bitte waehlen Sie eine aus.')).dialog({
                    "buttons": {
                        "schließen": function (e) {
                            $(this).dialog('close');
                        }
                    }
                });
            }
            //Wenn ein oder mehere gewählt...    
            if (say > 0) {
                $("[value='1']:checked").each(function() {
                    //Alle Links mit "Title" versehen sind, in link Variable
                    var self = $(this),
                        link = self.siblings('label').find('a.links_jquery').attr('title');
                    ul.append(li.clone().text(link));
                });
                //Ausgabe mit Return, mach das, ansonsten False
                d.append(p.clone().text('Möchten Sie wirklich diese News löschen:')).append(ul);
                d.dialog({
                    "buttons": {
                        "schließen": function (e) {
                            $(this).dialog('close');
                        },
                        "bestätigen": function (e) {
                            $(this).dialog('close');
                            $('form#meinFormular').submit();
                        }
                    }
                });
            }
            e.preventDefault()
            return false;
        }); //formular_submitFunction END
    });​
    

    Also, I apologize in advance if I named anything incorrectly in German. I only know what Google Translate tells me. 🙂

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

Sidebar

Related Questions

Can someone please tell me how I can implement the following line of pseudo-code.
I am trying to implement fancybox and jqueryui's accordion into my site, I can
I am trying to implement a jquery ui dialog box in my web app
I can implement both variants - it's easy. But I'm interested: what approach is
How can implement reordring in winforms datagridview by using the feature of drag and
Anyone knows how i can implement re-arrangable divs (Drag the divs around on the
How I can implement dynamic Jtree, which shows created instances of clases? For example,
I know that classes can implement various special methods, such as __iter__ , __setitem__
How I can implement Background Processing in asp.net. Can anyone give a small and
Any ideas of how best i can implement article revision history for a Java

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.