[jQuery] Replacing entire page.
Hello,
I am trying to replace the entire page when the user selects a
different option in a combo box. The code I have works for the first
iteration. However, It fails everytime there after. I went through
firebug and it appears after the first refresh it never triggers the
ready() method.
Any help is appreciated.
My Code is,
<script type="text/javascript">
$(document).ready(function() {
$("#id_company").change(function () {
var data = {};
data.company = $(this).val();
$.get("/ajax/search/", data, function(responseData){
$("html).html(responseData)
}, "html");
});
});
</script>