Fatal Javascript Error on FullCallendar and IE11

It's an error in one of your custom scripts, signup.js ...

Code:
function start_date_onChange (el, myVis, endIndex = 7) {

-- hugh
 
Interesting, Did it show where in the script? When I looked at the console the error was in a completely different file.
 
Guess I should explain that you can't provide defaults for function args in JS like that (you are thinking PHP). Well, you can in the latest and greatest JS spec, but that['s not in use yet.

Typically what you would do is, as the first line in the function ...

Code:
endIndex = typeof endIndex !=='undefined'? endIndex :7;

The reason that shows up as an error on the append() line, is the act of appending the form's content kicks off the ajax fetching of assets within the content with jQuery, so any errors in those are going to show up at that point.

-- hugh
 
I had to do some sleuthing, set J! debug mode to get the uncompressed jQuery, step into the append function, and watch where it fetched the assets.

Gotta love Javascript debugging.

-- hugh
 
Thanks for that. And yes, I just assumed you could set a default in JS like in PHP. I will have to go back through my code and see if I did it anywhere else.
 
That is a good point, I was struggling to set a breakpoint on the loaded js but it isn't visible until the form is loaded via ajax which is too late at that point.

Looking at all my js this was the only place I had set a default value in the function.

Thanks again for your assistance.
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top