Urgent clickTag Firefox error (solved)

Hello!

I’m making some banners that goes via DoubleClick guidelines.
Getting an error where Firefox opens up the clickTag links as “about:blank”.

How I add the clickTag is according to the guidelines above. I add this to the Head HTML:

<script type="text/javascript">
var clickTag = "http://www.google.com"; </script>

Then for the button, I add On Mouse Click, action: Go to URL…

javascript:window.open(window.clickTag)

Also click in checkbox “Open in a new window”.

Strangely, this works for all browsers but Firefox?

Hi Mattias (@FakePilot)

Using the way you’ve described … in Firefox the URL (javascript:window…) that you are linking to has to run in the current window first before it opens in a new window / tab which is why it begins with about:blank (in my testing experience in Firefox this technique leads to the correct URL being displayed so I’m not sure what’s happening with your document)

That being said I find the best way is to run a javascript function on mouse click that has the same call in it. But this way you avoid the “about:blank…” situation.

So, to clarify:

• On mouse click run a new function (call it whatever you want)
• in the function write:

window.open(clickTag, "_blank"); /// _blank is optional

• Then test (don’t forget to include the Head HTML clickTag variable as you have above)

Note window.clickTag is not necessary as this is for setting a variable available globally

4 Likes

This worked magic! Strange that Google still have that example in their guide. :slight_smile:

WOW thanks! It works great!!!