Javascript Syntax Error in "mobileshow" span

FlightlessDuck

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

Disney Vacation Planning. Free. Done for You.
Our Authorized Disney Vacation Planners are here to provide personalized, expert advice, answer every question, and uncover the best discounts. Let Dreams Unlimited Travel take care of all the details, so you can sit back, relax, and enjoy a stress-free vacation.
Start Your Disney Vacation
Disney EarMarked Producer






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

Add as a preferred source on Google

Back
Top Bottom