Use of Javascript
-
I am trying to embed the following map:
<script type=’text/javascript’ src=’http://www.marinetraffic.com/ais/embed.js’>However, it doesn’t seem to work. I also tried uploading the javascript file above in order to use it locally from within wordpress. Also didnt’ work.
Any suggestions?
BR,
Tilman
The blog I need help with is: (visible only to logged in users)
-
I just tried to simply paste the following code into the HTML editor, but it also did’t work. Does the free wordpress version not support javascript at all?
<script type=”text/javascript”>
var a = 5;
alert(“hello world. The value of a is: ” + a);
</script> -
I am a complete beginner as you notice.
Tried the same code on blogger and it just works.
-
We have code restrictions in place here on WordPressdotcom, so user added javascript won’t work here. You can learn more about that in this Support guide: https://en.support.wordpress.com/code/
What is it that you are trying to accomplish with that script? We have widgets or shortcodes that might do what you need.
WordPressdotcom (where we are) and standalone WP are different entities. You can learn more about the differences here: https://en.support.wordpress.com/com-vs-org/
Other resources you might be interested in:
https://en.support.wordpress.com/start/
http://en.support.wordpress.com/video-tutorials
https://learn.wordpress.com/
https://dailypost.wordpress.com/blogging-university/blogging-fundamentals/ -
Thanks for your reply.
I want to embed this map: https://www.marinetraffic.com/en/ais/home/centerx:4.9/centery:52.4/zoom:14
But I guess due to the code restrictions this won’t work. Too bad.. might stick to blogger instead. Dealing with that sort of code is already far out of my comfort zone. :D
-
You wouldn’t be able to embed the live map from that site, but you could use a screenshot thumbnail and an image widget with a link to the live map site. https://en.support.wordpress.com/widgets/image-widget/
Other option for map embeds currently available:
https://en.support.wordpress.com/google-maps/
https://en.support.wordpress.com/carto-embeds/But best wishes regardless of where you decide to set up. Cheers!
- The topic ‘Use of Javascript’ is closed to new replies.