开发者

jquery autocomplete restricted max items to ard 300 but it works in ie and others, any solution?

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜