Jump to content

- - - - -

modal, javascript & jwplayer

modal jwplayer

This topic has been archived. This means that you cannot reply to this topic.
2 replies to this topic

#1 evert100


    Super Member

  • Members
  • 157 posts

Posted 11 February 2013 - 08:53 AM



I am trying to implement javascript in a modal window. I am using the shortcode from pagelines  [pl_modal etc.


This is the code i am putting in the modal window between [pl_modal (this code implements the jwplayer for audio/video html5)


<div id="myElement2">Loading the player...</div>

<script type="text/javascript">
        file: " ",
         height: 40,
        width: 350,


Result: only seeing the text "Loading the player..." nothing is replaced. In the div should the player appear.


Is it possible to do this? So far i implemented an iframe tag and builded the player on a separate page. But this is more direct.


There is also a javascript. placed in <head> needed for working correctly. Maybe this script cannot be reached correctly from modal window? I don't know.


If this solution works it also solves the youtube video problem, as long as embedding is allowed from YT.



#2 evert100


    Super Member

  • Members
  • 157 posts

Posted 11 February 2013 - 08:54 AM

Crazy! The player is loaded in the topic. Amazing!

#3 Danny


    Is Awesome!

  • Moderators
  • 19838 posts

Posted 11 February 2013 - 11:12 AM



You may not be able to add this to a modal window, due to a possible .js conflict.


However, can you add the code to our paste service so I can try myself, as you can see above the code has become slightly corrupt.