Unexpected Token Error

I am getting an "Unexpected token" for the last ")" in this script and I can't find the source of the problem.  

Here is the page I am trying to display: page with error

Note that the datatable worked well without the parameters but now I need to add the parameters (thanks to EE for this script and help learning this process)

Any help would be much appreciated.

                                  
<script type="text/javascript">
    $(document).ready(function() {
    var series = 0;
    var categories = 0;
    var gender = 'M';

    $('#series').on('change',function(){
      series = $(this).val();
      categories = $('#categories').val();
      gender = $('#gender').val();
      getData(series,categories,gender);
     });

    $('#categories').on('change',function(){
      series = $('#series').val();
      categories = $(this).val();
      gender = $('#gender').val();
     });

    $('#gender').on('change',function(){
       series = $('#series').val();
       categories = $('#categories').val();
       gender = $(this).val();
     });

      function getData(series,categories,gender){
          // for testing
        alert (series+ ' '+gender + ' '+ categories);

        $('#standings').dataTable( {
        'ajax': '/series/results_array-new.asp?series_id='+series+'&gender='+gender+'&age_to='+categories
    });
});
</script>

Open in new window

Bob SchneiderCo-OwnerAsked:
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.

Big MontySenior Web Developer / CEO of ExchangeTree.org Commented:
you're missing the closing brace "}" in your getData function:

            function getData(series, categories, gender) {
                // for testing
                alert(series + ' ' + gender + ' ' + categories);

                $('#standings').dataTable({
                    'ajax': '/series/results_array-new.asp?series_id=' + series + '&gender=' + gender + '&age_to=' + categories
                });
            } <-- this was missing

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
Bob SchneiderCo-OwnerAuthor Commented:
Thanks!
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
AJAX

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.