Copy link to clipboard
Copied
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"); |
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
...Copy link to clipboard
Copied
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?
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
Chrome and Safari were a no but Firefox came through, thanks!
Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
I am just opening the HTML file in Chrome so perhaps that IS the issue.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now