开发者

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

开发者 https://www.devze.com 2023-01-16 18:38 出处:网络
var tags =\"s1,s2,...,s1670\"; $(\"#newtag0\").autocomplete(tags, { minChars: 0, width: 310, selectFirst: true,
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

精彩评论

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

关注公众号