views:

26

answers:

2

This works in firefox but doesn't do anything in IE:

            $("#_results").autocomplete({
                source: data,
                minLength: 0,
                select: function(event, ui) {
                    $("#log").empty();
                    log(ui.item.lname + ", " + ui.item.fname + " " + ui.item.sso);
                    log("Currently in " + ui.item.currentRotation + " rotation");
                    log("Graduated from: " + ui.item.college);
                    log("More details can be viewed by clicking here");
                    $("#log").attr("onclick", "location.href=\'" + ui.item.dataformEntry + "\'\;");
                }

Specifically $("#log").attr("onclick", "location.href=\'" + ui.item.dataformEntry + "\'\;");

Is there another way to do this?

Thanks

+2  A: 

try this

$("#log").click(function(){
     location.href= ui.item.dataformEntry;
});
Chinmayee
A: 

have you already tried with

$("#log").bind("click", function() { 
    location.href = ui.item.dataformEntry 
});
Fabrizio Calderan