Javascript Syntax Error in "mobileshow" span

FlightlessDuck

Y kant Donald fly?
Joined
Jun 20, 2006
Messages
21,804
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:













Receive up to $1,000 in Onboard Credit and a Gift Basket!
That’s right — when you book your Disney Cruise with Dreams Unlimited Travel, you’ll receive incredible shipboard credits to spend during your vacation!
CLICK HERE














DIS Facebook DIS youtube DIS Instagram DIS Pinterest DIS Tiktok DIS Twitter

Back
Top