How do I solve this javascript error with my carat.js file?

I'd been working on a project in VS 2010 in which I included a bootstrap template that included a carat.js file in one of the folders. In VS 2010 when I go into debug mode, I have no problems with any of the javascript files. I've moved the project into VS 2012 and now all of a sudden in the debugger I get an error in the carat.js file. It doesn't stop me from moving forward, but is very annoying and I have to hit the break or continue button to continue debugging. My VS 2010 project lives on a Win XP machine and my VS 2012 version of the project lives on a Win 7 machine. All of my research up to this point hasn't yielded any resolution. The most active resolution I tried involves installing the download here:

        http://www.microsoft.com/en-us/download/confirmation.aspx?id=36020

 The problem is in the method shown below. I'm not an expert enough in javascript and or its dependencies to know how to solve this. Any suggestions?

expExchCaratJSError.jpg
LVL 1
Michael SterlingWeb Applications DeveloperAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

RobOwner (Aidellio)Commented:
Have you included the bxSlider js file?

<!-- bxSlider Javascript file -->
<script src="/js/jquery.bxslider.min.js"></script>

What it tells me is that file hasn't loaded and consequently the function startAuto() along with it.
0
Michael SterlingWeb Applications DeveloperAuthor Commented:
@Rob_lurd: I found both the latest version of bxslider, which is 4.(something) and a .min version of bxslider 3. I included them both in my js folder and separately referenced them. Each time I get the same error. The only thing that's preventing this error currently, is me commenting out that line of code in that function. Any other suggestions?
0
RobOwner (Aidellio)Commented:
You should only have one version or there's bound to be errors. Only include the 4 version
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

Michael SterlingWeb Applications DeveloperAuthor Commented:
@Rob_lurd: understood. I wound up sticking with version #4 and I'm still getting the error.
0
RobOwner (Aidellio)Commented:
Ok but that eliminates other issues that could crop up.  Can you try and change the variable name you're using from "news" to "myslider".  That will remove any conflicting variable names.
0
RobOwner (Aidellio)Commented:
Also make sure you've got the latest version of bxslider... 4.2.4 by the look of it https://github.com/stevenwanderski/bxslider-4
0
Michael SterlingWeb Applications DeveloperAuthor Commented:
@Rob: I will check the version. But the error I get when I change the name to "myslider" is this:

myslider error
it doesn't recognize that name/variable.
0
Michael SterlingWeb Applications DeveloperAuthor Commented:
@Rob: after downloading the .js file from that site, I'm still getting the original error in my carat.js file that I originally posted. The only differences that I can truly lay my finger on is that one machine is a Win XP machine and the other is a Win 7, and on the Win7 machine I'm running VS 2012 and VS2010 on the XP machine,
0
RobOwner (Aidellio)Commented:
Sorry I meant the you change all instances of the name of the variable above as well

var news = ...
To
var myslider = ...
0
Michael SterlingWeb Applications DeveloperAuthor Commented:
@Rob: Oh, ha. Luckily for me there was only one instance of that news variable. I searched the entire .js file for that name and it only showed up once.
0
RobOwner (Aidellio)Commented:
that's ok as the news variable is only defined within the scope of that function anyway.  This was to rule out that "news" was conflicting with another variable, even a reserved word.
0
Michael SterlingWeb Applications DeveloperAuthor Commented:
Any other suggestions? Anyone?
0
RobOwner (Aidellio)Commented:
Did you change the variable name in both places?

I mean, the variable is moot anyway because you don't use it.

Try removing it altogether:
function _initNewsCarousel(selector) {
    $(selector).bxSlider({
        ...
        ...
    }).autoStart();
}

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Michael SterlingWeb Applications DeveloperAuthor Commented:
Thank you.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
JavaScript

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.