monosyth
asked on
jquery ui autocomplete not working in internet explorer
This was working just fine yesterday and for the past year, I then updated jquery ui, but then put it back, and it doesn't work in IE, it works in all other browsers though. Is there an error in here? I have changed nothing, so I'm not sure why it's not working today.
<script>
$(function() {
$.ajax({
url: "/scripts/jqueryui/dev/dem os/autocom plete/titl es.xml",
dataType: "xml",
success: function( xmlResponse ) {
var data = $( "titlename", xmlResponse ).map(function() {
return {
value: $( "title", this ).text(),
spanishvalue: ( $.trim( $( "titlespanish", this ).text() ) || "(no translation)" ),
id: $( "titlenameId", this ).text()
};
}).get();
$( "#titles" ).autocomplete({
source: data,
minLength: 0,
select: function( event, ui ){
$("#ListingTitleSpanish"). val(ui.ite m.spanishv alue);
}
});
}
});
});
</script>
<script>
$(function() {
$.ajax({
url: "/scripts/jqueryui/dev/dem
dataType: "xml",
success: function( xmlResponse ) {
var data = $( "titlename", xmlResponse ).map(function() {
return {
value: $( "title", this ).text(),
spanishvalue: ( $.trim( $( "titlespanish", this ).text() ) || "(no translation)" ),
id: $( "titlenameId", this ).text()
};
}).get();
$( "#titles" ).autocomplete({
source: data,
minLength: 0,
select: function( event, ui ){
$("#ListingTitleSpanish").
}
});
}
});
});
</script>
ASKER
hmm i updated jquery,
but now see these errors:
Message: 'jQuery' is undefined
Line: 10
Char: 1
Code: 0
URI: http://www.weblisters.com/scripts/jqueryui/dev/ui/jquery.ui.core.js
Message: 'jQuery' is undefined
Line: 10
Char: 1
Code: 0
URI: http://www.weblisters.com/scripts/jqueryui/dev/ui/jquery.ui.widget.js
Message: 'jQuery' is undefined
Line: 10
Char: 1
Code: 0
URI: http://www.weblisters.com/scripts/jqueryui/dev/ui/jquery.ui.position.js
Message: 'jQuery' is undefined
Line: 15
Char: 1
Code: 0
URI: http://www.weblisters.com/scripts/jqueryui/dev/ui/jquery.ui.autocomplete.js
but now see these errors:
Message: 'jQuery' is undefined
Line: 10
Char: 1
Code: 0
URI: http://www.weblisters.com/scripts/jqueryui/dev/ui/jquery.ui.core.js
Message: 'jQuery' is undefined
Line: 10
Char: 1
Code: 0
URI: http://www.weblisters.com/scripts/jqueryui/dev/ui/jquery.ui.widget.js
Message: 'jQuery' is undefined
Line: 10
Char: 1
Code: 0
URI: http://www.weblisters.com/scripts/jqueryui/dev/ui/jquery.ui.position.js
Message: 'jQuery' is undefined
Line: 15
Char: 1
Code: 0
URI: http://www.weblisters.com/scripts/jqueryui/dev/ui/jquery.ui.autocomplete.js
ASKER
Nevermind that error. I had commented out one of the jquery files, then I put it back:
<script src="/scripts/jquery.js" type="text/javascript"></s cript>
<script src="/scripts/jqueryui/dev /jquery-1. 7.1.js" type="text/javascript"></s cript>
<link rel="stylesheet" href="/scripts/jqueryui/de v/themes/b ase/jquery .ui.all.cs s">
<script src="/scripts/jqueryui/dev /ui/jquery .ui.core.j s" type="text/javascript"></s cript>
<script src="/scripts/jqueryui/dev /ui/jquery .ui.widget .js" type="text/javascript"></s cript>
<script src="/scripts/jqueryui/dev /ui/jquery .ui.positi on.js" type="text/javascript"></s cript>
<script src="/scripts/jqueryui/dev /ui/jquery .ui.autoco mplete.js" type="text/javascript"></s cript>
<script src="/scripts/jquery.js" type="text/javascript"></s
<script src="/scripts/jqueryui/dev
<link rel="stylesheet" href="/scripts/jqueryui/de
<script src="/scripts/jqueryui/dev
<script src="/scripts/jqueryui/dev
<script src="/scripts/jqueryui/dev
<script src="/scripts/jqueryui/dev
put it before all others plugins using it, that's the rule!
last posted before your last one...
why two jQuery plugin?
<script src="/scripts/jquery.js" type="text/javascript"></s cript>
<script src="/scripts/jqueryui/dev /jquery-1. 7.1.js" type="text/javascript"></s cript>
remove the first one
why two jQuery plugin?
<script src="/scripts/jquery.js" type="text/javascript"></s
<script src="/scripts/jqueryui/dev
remove the first one
ASKER
i did remove the first one, and then i got the errors, listed above.
could you confirm your URL is http://www.weblisters.com ?
ASKER
yup. it is.
ASKER
hmm, ok, so the errors were there because I was pointing at a bad jquery file. so back to square one. works in FF, not in IE
Sorry, I don't see the scripts anywhere in this page
ASKER
The scripts aren't running on that page, its on the inside of my app
ASKER
This is my page header - Works in FF/Mozilla but not IE:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="expires" content="0">
<title>Post Ad</title>
<script src="http://www.weblisters.com/scripts/jqueryui/js/jquery-1.7.1.js"></script>
<script src="http://www.weblisters.com/scripts/jqueryui/dev/ui/jquery.ui.core.js" type="text/javascript"></s cript>
<script src="http://www.weblisters.com/scripts/jqueryui/dev/ui/jquery.ui.widget.js" type="text/javascript"></s cript>
<script src="http://www.weblisters.com/scripts/jqueryui/dev/ui/jquery.ui.position.js" type="text/javascript"></s cript>
<script src="http://www.weblisters.com/scripts/jqueryui/dev/ui/jquery.ui.autocomplete.js" type="text/javascript"></s cript>
<script>
$(function() {
$.ajax({
url: "/scripts/jqueryui/dev/dem os/autocom plete/titl es.xml",
dataType: "xml",
success: function( xmlResponse ) {
var data = $( "titlename", xmlResponse ).map(function() {
return {
value: $( "title", this ).text(),
spanishvalue: ( $.trim( $( "titlespanish", this ).text() ) || "(no translation)" ),
id: $( "titlenameId", this ).text()
};
}).get();
$( "#titles" ).autocomplete({
source: data,
minLength: 0,
select: function( event, ui ){
$("#ListingTitleSpanish"). val(ui.ite m.spanishv alue);
}
});
}
});
});
</script>
Then in my html:
<input id="titles" size="80" class="ui-widget" onClick="this.select()" />
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="expires" content="0">
<title>Post Ad</title>
<script src="http://www.weblisters.com/scripts/jqueryui/js/jquery-1.7.1.js"></script>
<script src="http://www.weblisters.com/scripts/jqueryui/dev/ui/jquery.ui.core.js" type="text/javascript"></s
<script src="http://www.weblisters.com/scripts/jqueryui/dev/ui/jquery.ui.widget.js" type="text/javascript"></s
<script src="http://www.weblisters.com/scripts/jqueryui/dev/ui/jquery.ui.position.js" type="text/javascript"></s
<script src="http://www.weblisters.com/scripts/jqueryui/dev/ui/jquery.ui.autocomplete.js" type="text/javascript"></s
<script>
$(function() {
$.ajax({
url: "/scripts/jqueryui/dev/dem
dataType: "xml",
success: function( xmlResponse ) {
var data = $( "titlename", xmlResponse ).map(function() {
return {
value: $( "title", this ).text(),
spanishvalue: ( $.trim( $( "titlespanish", this ).text() ) || "(no translation)" ),
id: $( "titlenameId", this ).text()
};
}).get();
$( "#titles" ).autocomplete({
source: data,
minLength: 0,
select: function( event, ui ){
$("#ListingTitleSpanish").
}
});
}
});
});
</script>
Then in my html:
<input id="titles" size="80" class="ui-widget" onClick="this.select()" />
so, here we go!
try something : put all your javascript at the end of your page, just before the </body> tag
ASKER
hmm, nope that didn't work.
it's weird, because last week this was fine until I downloaded the latest version of jquery UI, then updated the jquery only. I then put old jquery back from my backup and it now doesn't work. I hadn't updated this page its on otherwise. it's really frustrating!
it's weird, because last week this was fine until I downloaded the latest version of jquery UI, then updated the jquery only. I then put old jquery back from my backup and it now doesn't work. I hadn't updated this page its on otherwise. it's really frustrating!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
i figured it out on my own
and jQuery too (1.7.1) : http://code.jquery.com/