Tell me more ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I have added these script inside webpart and added this inside webpart page. Its working fine in IE but not working in chrome.

<script src="/_layouts/scripts/jquery-1.7.1.min.js" type="text/javascript"></script>
<script src="/_layouts/scripts/jquery-ui-1.8.18.custom.min.js" type="text/javascript"></script>
<script src="/_layouts/scripts/jquery.ui.core.js" type="text/javascript"></script>
<script src="/_layouts/scripts/jquery.ui.widget.js" type="text/javascript"></script>
<script src="/_layouts/scripts/jquery.ui.position.js" type="text/javascript"></script>
<script src="/_layouts/scripts/jquery.ui.autocomplete.js" type="text/javascript"></script>
<script src="/_layouts/scripts/jquery.SPServices-0.6.2.min.js" type="text/javascript"></script>

<script type="text/javascript">

    $(function () {

        var availableTags = GetListItems();

        function split(val) {

            return val.split(/,/);

        }

        function extractLast(term) {

            return split(term).pop();

        }



        $("input[name*='txtBox']")

        // don't navigate away from the field on tab when selecting an item

            .bind("keydown", function (event) {

                if (event.keyCode === $.ui.keyCode.TAB &&

                        $(this).data("autocomplete").menu.active) {

                    event.preventDefault();

                }

            })

            .autocomplete({

                minLength: 0,

                source: function (request, response) {

                    // delegate back to autocomplete, but extract the last term

                    response($.ui.autocomplete.filter(

                        availableTags, extractLast(request.term)));

                },

                focus: function () {

                    // prevent value inserted on focus

                    return false;

                },

                select: function (event, ui) {

                    var terms = split(this.value);

                    // remove the current input

                    terms.pop();

                    // add the selected item

                    terms.push(ui.item.value);

                    // add placeholder to get the comma-and-space at the end

                    terms.push("");

                    this.value = terms.join(",");

                    return false;

                }

            });
    });
</script>


I used spservice to get the items from the list and stored in array and return to availableTags... pls help me

share|improve this question
Since the posted script was already working, I'm closing the question. – Kit Menke Apr 29 '12 at 13:01

closed as too localized by Kit Menke Apr 29 '12 at 13:01

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, see the FAQ.

2 Answers

Can you detail which particular section are you missing while viewing in Chrome or whats the error that you get in Chrome?

Also, keep in mind that Chrome is not on the supported browser list for SharePoint. Here's the list of approved browsers

http://technet.microsoft.com/en-us/library/cc263526.aspx

share|improve this answer
Thanks for the answer. I didn't get any error in the page and also the scripts are loaded without error, but the functionality is not working..Here the functionality is when i press any charecter in the textbox then the suggested words should display in dropdown... – yogesh Mar 28 '12 at 14:24
Thanks for the link.. – yogesh Mar 28 '12 at 14:25

Its working thanks for all..... i did nothing just clean the solution and then deployed

share|improve this answer
Can you explain a bit more how you fixed it? I'm assuming you are deploying these scripts in a WSP? – Kit Menke Mar 29 '12 at 13:20
i did just by cleaning solution that contain webpart..thats it... – yogesh Mar 29 '12 at 15:08

Not the answer you're looking for? Browse other questions tagged or ask your own question.