Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

clickTAG working in test, not working on publish.

Community Beginner ,
Jan 24, 2019 Jan 24, 2019

I have made a banner ad in HTML 5 with a clickTAG on a button. When I run a test inside of Animate, the button works fine. When I publish the button doesn't work. I am very new to Animate and have spent half the day combing forums and YouTube to no avail.

Here is the clickTAG code

this.clickTAG.addEventListener("click", fl_ClickToGoToWebPage_4);
function fl_ClickToGoToWebPage_4() {
window.open("https://bottomlounge.com/events", "_blank");
1.1K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Advocate , Jan 24, 2019 Jan 24, 2019

Hi ehren

How do you test after publishing? Do you just open your export HTML document from your local disk or do you test from a server?

When you test inside Animate (ctrl/cmd + Enter), a local web server is invoked automatically (http://127.0.0.1​) and Javascript calls work without glitch. If you open the document after publishing witout this server support this can cause problems. Make sure you test your stuff always on a web server.

There are also opportunities to install a local web server for

...
Translate
Engaged ,
Jan 24, 2019 Jan 24, 2019

Hi,

you are missing a } on line 6.

When you say Publish do you mean hitting CTRL and Enter on Windows (or Control > Test) in Animate to test it? Or you mean testing it on a server?

To help you for future reference then when you say you Published anything regarding to Animate then that is meaning you tested it in Animate locally on your computer i.e. hitting CTRL and Enter on Windows (or Control > Test) in Animate.

When I add the } to line 6 and test it then it works for me.

Hope this helps?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jan 24, 2019 Jan 24, 2019

Hi!

When I control test it works. When I open up the html file in Chrome, it does not. I checked the code in Dreamwaver just now and the } does appear after the url line code.

Screen Shot 2019-01-24 at 8.52.02 AM.png

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Jan 24, 2019 Jan 24, 2019

Hi,

try it on a few different browsers besides Chrome. If it works on some and not on others then this is the browser's security kicking in.

It should work if you try and run it off a server and not locally.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jan 24, 2019 Jan 24, 2019
LATEST

Chrome and Safari were a no but Firefox came through, thanks!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Jan 24, 2019 Jan 24, 2019

Hi ehren

How do you test after publishing? Do you just open your export HTML document from your local disk or do you test from a server?

When you test inside Animate (ctrl/cmd + Enter), a local web server is invoked automatically (http://127.0.0.1​) and Javascript calls work without glitch. If you open the document after publishing witout this server support this can cause problems. Make sure you test your stuff always on a web server.

There are also opportunities to install a local web server for test runs like this. Look into MAMP or WAMPserver.

Your function fl_ClickToGoToWebPage_4 needs by the way a closure } in line 06, though that's propably just a copy/paste miss.

Klaus

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jan 24, 2019 Jan 24, 2019

I am just opening the HTML file in Chrome so perhaps that IS the issue.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines