0

I am using jQuery UI to create an AJAX form. My form is working correctly, however the text attribute of the buttons is not being displayed for some reason.

This is what I am using:

$( "#help_form" ).dialog({
        autoOpen: false,
        height: 300,
        width: 350,
        modal: true,
        buttons: [
            {
                text: "Send Request",
                id: "submit_help_form",
                click: function() {}
            }
        ]
    });

The button is displayed at the bottom of the form, but no text is shown on it.

Can anyone see what I have done wrong?

Any advice appreciated.

Thanks.

3
  • 2
    Works fine here jsfiddle.net/dcgdJ Commented Apr 12, 2011 at 14:14
  • Is that the text really not shown? Or it has the same color with the background? Commented Apr 12, 2011 at 14:15
  • It turned out that the site was using an older version of jQuery. I updated to the latest version and it started working fine. Commented Apr 13, 2011 at 13:56

1 Answer 1

1

Your code works here, I could see the button label. What browser are you using? I tried change some parts and it worked too:

$(function(){
    $( "#help_form" ).dialog({
        autoOpen: false,
        height: 300,
        width: 350,
        modal: true,
        buttons: {
            "Send Request":function() {alert(0);} 
            ,"Send Request2":function() {alert(2);} 
        }
    });

    $( "#help_form" ).dialog('open');
});
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.