jak powinna wyglądać poprawnie poniższa zmienna by przekierować ją do zawartości id="state"?
window.location.replace('+ #state +')
<form> <input type="text" id="state" name="state" /> <input readonly="readonly" type="text" id="abbrev" name="abbrev" maxlength="2" size="2"/></p> <input type="text" id="state_abbrev" name="state_abbrev" /></p> <input type="submit" name="submitBtn" value="Submit" /> </form> <script> $(function() { $('#abbrev').val(""); $("#state").autocomplete({ source: "compl2.php", minLength: 2, select: function(event, ui) { $('#state_id').val(ui.item.id); window.location.replace('+ #state +'); $('#abbrev').val(ui.item.abbrev); } }); $("#state_abbrev").autocomplete({ source: "states_abbrev.php", minLength: 2 }); }); </script>