I have this var
var mylabelname = "ok";
$( ".selector" ).dialog({ buttons: { mylabelname : function() { $(this).dialog("close"); } } });
so when it display it shows on the button “mylabelname” and not the value. How can I have the value show.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
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.
Hmmm… I guess you cant make it happen. Your dialogue syntax is using JSON, which understands it’s keys as strings not variables. It won’t put mylabel’s value there even if it’s without quotes. I mean, in this syntax:
{key: value}, if the value is without quotes, it will pass it’s value, but the key won’t.You’ll need to write th
"ok"string instead ofmylabel.