Javascript Bug in Simple Search Conlib

For general questions and discussions specific to the AbleCommerce GOLD ASP.Net shopping cart software.
Post Reply
User avatar
dmurphy4
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 30
Joined: Wed Sep 26, 2012 1:47 pm
Location: Wichita, Kansas USA

Javascript Bug in Simple Search Conlib

Post by dmurphy4 » Wed Jul 03, 2013 9:50 am

I found a bug in the RC5 Simple Search conlib.

See comment in code below:

Code: Select all

<script type="text/javascript">
    $(function () {
        $(".searchPhrase").autocomplete({
            source: function (request, response) {
                $.ajax({
                    url: "Search.aspx/Suggest",
                    data: "{ 'term': '" + request.term + "' }",
                    dataType: "json",
                    type: "POST",
                    contentType: "application/json; charset=utf-8",
                    dataFilter: function (data) { return data; },
                    success: function (data) {
                        response($.map(data.d, function (item) {
                            return {
                                value: item
                            }
                        }))
                    },
                }); // I GET ERROR MESSAGE HERE: "Expected Identifier or String"  - The corrective action is to remove the comma in the line above this one. 
            },
            minLength: 2
        });
    });
</script>
I recently upgraded to RC5 from RC4 Gold but I'm not sure if I was also getting this error when on RC4.

Hope this helps someone else.
Daniel Murphy
Web Developer - Front End
http://StearnsFlotation.com, http://MadDogGear.com, http://Aerobed.com, http://Sevylor.com
Wichita, Kansas

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: Javascript Bug in Simple Search Conlib

Post by mazhar » Wed Jul 03, 2013 10:47 am

Thanks! I just confirmed and reported this.

Post Reply