jQuery UI Dialog not working when publishing to Seamless Play

jcraft6852
jcraft6852 Community Member Posts: 22
We have been using jQuery UI Dialog in our courses to pop up a dialog overlay. This has worked beautifully until publishing to Seamless Play. Now it's completely broken. Does anyone else use jQuery UI Dialog here? Or, does anyone know why publishing to Seamless Play would break it?

Comments

  • krodgers6170
    krodgers6170 Community Member Posts: 25
    I use custom javascript and when I turn on seamless play and publish - it doesn't work.

    If I turn off seamless play and publish the course and scripts work as designed.

    Have you tried unchecking the box for seamless play when publishing?

     

    Kelsey
  • jcraft6852
    jcraft6852 Community Member Posts: 22
    Yes, it works great if I DONT publish to Seamless Play.

    But there's got to be a way to get it to work with Seamless Play... We really need to have Seamless Play, been waiting for it for a long time, it's an awesome enhancement, and not having it has been one of the biggest complaints from our customers.

    I'm hoping to figure out a way to pop open a resize-able, adjustable, customize-able text box (like using jQuery UI Dialog OR some other method) AND publish to Seamless Play.
  • wheels
    wheels Florida USACommunity Member, Administrator, Moderator, Rockstar Manager Posts: 574 eLearning ROCKSTAR Admin Team
    There are some changes necessary to work with SPP.  The main difference is that display is happening in a different window.  To access the "display" window and it's components use these API:
    • getDisplayWindow()
      • Returns the window objects that is to be used for dealing with the js objects generated by Lectora and all window related attributes
    • getDisplayDocument()
      • Returns the document object that is to be used for dealing with the visual HTML objects, it contains all of the currently HTML elements for the page
    • getCurrentPageDiv()
      • Returns an HTML element that represents the page div
    • getCurrentPageID()
      • Returns a string with the name of the current page div
    • appendElement(obj, parentElement, htmlElement)
      • This function can be used for attaching objects to the current page div; the customer would only need to pass in the last attribute as either a HTML element or a string.
    I have not used JQuery UI for very much but I have attached one simple example of how it can be used to display a dialog so that it works when published to SPP.
  • jcraft6852
    jcraft6852 Community Member Posts: 22
    Hi Joe, thanks for your valuable feedback. That is going to help out a ton! I had stumbled my way through getting the dialog box functionality to work the way I wanted yesterday and ended up with a working version - just prior to your post. However, for some reason my version doesn't work on an iPad (works every other device and browser I tested though).

    Looking at your PKG file, I see your code is much "cleaner" than what I came up with, and it works in all of our test devices and browsers. I'll be able to re-work my attempt from yesterday to incorporate the examples you provided.

    Thanks again!