javscript loading before dom load
Posted: Fri Oct 23, 2009 11:13 pm
Hi guys,
I am trying to insert the following call into my page;
It works fine in all browsers except ie(6,7,8)
I understand it is caused by the jquery autocomplete function loading before the page / DOM has fully loaded.
I tried adding Defer="true" to the script however this doesn't seem to work.
Could someone please tell me what i must add to the script so that it loads after the dom has fully loaded?
Thanks guys
George
I am trying to insert the following call into my page;
Code: Select all
<script type="text/javascript" defer="true">
$('#query').autocomplete({
serviceUrl:'service/autocomplete.ashx',
minChars:1,
delimiter: /(,|;)\s*/, // regex or character
maxHeight:400,
width:250,
deferRequestBy: 0, //miliseconds
params: { country:'Yes' }, //aditional parameters
// local autosugest options:
lookup: ['January', 'February', 'March', 'April', 'May'] //local lookup values
});
</script>It works fine in all browsers except ie(6,7,8)
Code: Select all
Internet Explorer can not open website. Operation Aborted.I tried adding Defer="true" to the script however this doesn't seem to work.
Could someone please tell me what i must add to the script so that it loads after the dom has fully loaded?
Thanks guys
George