Javascript Syntax Error in "mobileshow" span

FlightlessDuck

Y kant Donald fly?
Joined
Jun 20, 2006
In the Chrome development console, the following error displays:

"post-thread:1295 Uncaught SyntaxError: missing ) after argument list"

In the area of the page HTML where mobile ads would show, there is a span with the class "mobileshow". In that span there is javascript tag that calls:

JavaScript:
googletag.cmd.push(function() { googletag.display(''div-gpt-ad-1497483587083-0'); });

It appears what you are trying to do is add a reference to an anonymous function into the googletag.cmd array. BUT the parameter being sent (div-gpt-ad-1497483587083-0) has a grammar error because the string value is started with a double quote but ended with a single quote.

JavaScript:
googletag.cmd.push(function() { googletag.display(''div-gpt-ad-1497483587083-0"); });

(ACTUALLY IT TURNS OUT THAT ISN'T A DOUBLE QUOTE, IT's TWO SINGLE QUOTES)

So, here ya go:
JavaScript:
googletag.cmd.push(function() { googletag.display('div-gpt-ad-1497483587083-0'); });
 
Last edited:

GET A DISNEY VACATION QUOTE

Dreams Unlimited Travel is committed to providing you with the very best vacation planning experience possible. Our Vacation Planners are experts and will share their honest advice to help you have a magical vacation.

Let us help you with your next Disney Vacation!





Top