var tags ="s1,s2,...,s1670";
$("#newtag0").autocomplete(tags, {
minChars: 0,
width: 310,
selectFirst: true,
multiple: true,
cacheLength:1672,
max:1672
});
This will work in IE 7 and 8, chrome and safari but in firefox it results only s388 last with no errors.. Means 4096 chars..
Is it browser restriction, need to figure it ou开发者_C百科t..
I encounter the same issue. The work around would be to do array static initalization on server side. For example, in jsp, I do this:
<script type="text/javascript"><!--
var survey_ds = [
<%=StringUtil.getAllSurveyName()%>
];
var tag_ds = [
<%=StringUtil.getAllTag()%>
];
</script>
and use the array in js. I guess the static initialization is not on heap this time. And all those browsers could work with it.
精彩评论