EhabBug / dropdown-check-list

Automatically exported from code.google.com/p/dropdown-check-list
0 stars 0 forks source link

Ajax based form filling #276

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
** What steps will reproduce the problem?
Ajax load form data in dialog box.
First time works.
Close/Destroy dialog
Second time list does not work without refreshing page.

** What is the expected output? What do you see instead?
second instantiation of dialog code fails to produce drop down
there are no javascript errors 

** What is your environment?
-- DropDownCheckList version: 1.4
-- jQuery version:
jQuery 1.7.2, jQuery 1.8.1 - same problem
-- jQuery UI version:
jQuery UI - v1.8.23
-- Browser and version:
latest firefox
latest chrome

** Please provide any additional information below/Please attach sample
html

Original issue reported on code.google.com by korby...@gmail.com on 12 Dec 2012 at 12:20

GoogleCodeExporter commented 8 years ago
Here is the simple code that illustrates the error. First invocation of dialog 
works, on subsequent dialog invocations the is in error.

<!doctype html>
<html>
<head>
<link href="jquery-ui.css" rel="stylesheet" />
<link href="ui.dropdownchecklist.css" rel="stylesheet" />
<script src="jquery.js"></script>
<script src="jquery-ui.js"></script>
<script src="ui.dropdownchecklist.js"></script>
<script>
$(function() {
    var d = "<select id='l' multiple><option>1</option><option>2</option><option>3</option></select>";
    d += "\<script\>$(function(){$('#l').dropdownchecklist();});\</script\>";
    $('#show').click( function() {
        $('#dlg').html(d);
        $('#dlg').dialog();
    } );
} );
</script>
</head>
<body>
<button id='show'>ShowIt</button>
<div id='dlg'></div>
</body>
</html>

Original comment by korby...@gmail.com on 20 Dec 2012 at 2:37