0
for(var i = 0; i < 4; i++) {
    $(function() {  
        $("#editdialog" + i).dialog({
            autoOpen: false,
            hieght: 200,
            width: 700,
            modal: true
        });
        $("#EditButton" + i)
            .button()
            .click(function() {
                $("#editdialog" + i).dialog("open");
            }); 
    });
}

What is the problem with above javascript code ?

Rory McCrossan
  • 319,460
  • 37
  • 290
  • 318
mak2131
  • 9
  • 3
  • 2
    What is the problem in making an effort to understand what the code is doing? – asprin Jun 24 '14 at 09:28
  • possible duplicate of [JavaScript closure inside loops – simple practical example](http://stackoverflow.com/questions/750486/javascript-closure-inside-loops-simple-practical-example) – Jeremy J Starcher Jun 24 '14 at 13:22

0 Answers0