[jQuery] Issue with <script> block inside a page loaded with .load method.
Hey guys,
I'm having a weird problem.
Browser IE6.
I'm loading a page inside a div using onclick="$
('##c_right_content').load('./act/add.cfm');">
This page that gets loaded have the above <script> block that makes
this page makes the whole browser screen blank, while if I remove this
block of code, the form shows up perfectly.
What it could be?
Thanks.
<script type="text/javascript" charset="utf-8">
$(document).ready(function(){
// Select-filler code...
$(function(){
$("select#strategy").change(function(){
$.getJSON("getParents.cfm",{id: $(this).val()}, function(j){
var options = '';
for (var i = 0; i < j.length; i++) {
options += '<option value="' + j[i].optionValue + '">' +
j[i].optionDisplay + '</option>';
}
$("#parent").html(options);
$('#parent option:first').attr('selected', 'selected');
})
})
})
//
});
</script>