Jump to content

Archived

This topic is now archived and is closed to further replies.

borzd

Javascript inserted in any modules won't load

Recommended Posts

borzd
I tried to insert below code in textbox, mediabox, highlite, and in Postloop/content
 
<script type="text/javascript" src="http://engineering.prezi.com/javascripts/libs/prezi_player.js"></script>

<script type="text/javascript">
    var player = new PreziPlayer('prezi-player', {
        preziId: '4v1f5ktgsdpg',
        controls: true,
        width: "100%",
        height: "450",
explorable: false,

    });

    player.on(PreziPlayer.EVENT_STATUS, function(event) {
        if (event.value == PreziPlayer.STATUS_CONTENT_READY) {
			player.play(600);
        }
    });
</script>

<div id="prezi-player"></div>

In postloop it is not loadind at all.

 

In other modules it loads only when I put mouse pointer in the field I put it:

 
After reloading the page it's not loading automatically:
 
When I go to edit module and put coursor in the field with code - it loads....
 
I tried to put it in custom header code (keeping the <div id="prezi-player"></div> in place) - no luck aswell. Not loading at all.
 
Iframes working well thought.
 
Will be much appreciated.

Share this post


Link to post
Share on other sites
borzd
Wordpress has filter that stops javascript from running. If it is included in posts/pages etc.
 
Had to use plugin, that walked around it.

Share this post


Link to post
Share on other sites
greenfly

Hello @borzd 

 

Good to hear this is working and glad you found the Hooker plugin. Is that working for you? 


The answer to many issues can be found by searching in the forum before posting as someone else  may very well have had the same problem before you have.  Also, reading the documentation can help you gain a good understanding of how everything works. 

 

Please do not send me private messages. Occam's razor - The principle states "Keep things simple!"

Share this post


Link to post
Share on other sites
borzd

martin davies

 

As I found other plugin (HTML Javascript Adder) before, haven't tested Hooker yet.

 

The one I use works great. But have to use in widget. Will test Hooker at some point and update!

Share this post


Link to post
Share on other sites
greenfly

Ok - please let us know how you get on. 


The answer to many issues can be found by searching in the forum before posting as someone else  may very well have had the same problem before you have.  Also, reading the documentation can help you gain a good understanding of how everything works. 

 

Please do not send me private messages. Occam's razor - The principle states "Keep things simple!"

Share this post


Link to post
Share on other sites

×