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 8068867
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T12:49:34+00:00 2026-06-05T12:49:34+00:00

I am creating two buttons for use in a dialog box and it does

  • 0

I am creating two buttons for use in a dialog box and it does not seem what I do, I cannot get the icon to display with the text. I can do this elsewhere just fine.

This works (which is almost copy and pasted from the docs:

$("#signout_button").button({label:"Sign Out", icons: { primary: 'ui-icon-key'}});

This does not work:

              $("#dialog_link").dialog({draggable: true, title: "Are you sure?", show: "slide", modal: true, width:500,height:200,
                buttons: [{

                  label:'Yes, I am sure',
                  icons: { primary: 'ui-icon-alert' },
                  click: function(){
                    alert('well alrighty then');
                  }    
                },{
                  text:'No, please make it stop',
                  icons: { primary: 'ui-icon-alert' },
                  click: function(){
                    alert('well alrighty then');
                  }
                }]
              });

The div already exists and is very simple

<div id="dialog_link"></div>

It’s some sort of weird syntax error I think. The dialog box pops open just fine and the click events fire so the javascript did not crash.

The first button, which is the way I am familiar with results in a button with no icon and no text. The 2nd button is an icon with only text.

I have also tried:

text:true,
label: 'test label',
icons: {primary: 'ui-icon-alert'},
click: function(){ alert('testing');}

The signout button at the renders with both icon and label. Is this a JQuery bug in the dialog box creation or I am missing something really stupid and simple?

  • 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-05T12:49:36+00:00Added an answer on June 5, 2026 at 12:49 pm

    It seems that its not built-in the dialog to create buttons with icons.

    Your problem with the empty button is simple: don’t write “label” use “text” instead (as you do on your second button).

    To use an icon anyway see this solution jQuery UI Dialog Button Icons. I think the last answer is the best.

    I put that all together in this fiddle and it works: http://jsfiddle.net/GzeMT/

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

Sidebar

Related Questions

I am creating a dialog box which is like a login screen containing two
I am creating a registration form which contains two submit buttons. I need to
I am creating a login register page which contains two edit text boxes(one for
I'm creating a mobile web app (not native), and I want to use the
So I currently have a jQuery dialog with two buttons: Save and Close. I
I have a custom dialog box that collects two strings from the user. I
I'd rather write an application with two buttons on the applications menu than use
I am creating a window with two image buttons (using TriplePlay in my playN
I need to insert UIElements into a Grid that does not get generated until
Essentially, I am just creating two classes where one class, in this case class

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.