Events in buttons

Tagged: ,

This topic contains 5 respuestas, has 2 voices, and was last updated by  Ignacio Gros Hace 7 años, 5 meses.

  • Author
    Entradas
  • #27932

    kike
    Member

    Hi!

    I would like to know how to add an event handler in a new button. I seen the function that uses in others buttons is “nevow_clientToServerEvent(3 or 4 params including the action and the component)” to do an event. But I don’t understand how works that function, because in livepage.py script inside the package nevow just return that fuction as a tag.

    I would greatly appreciate your help!

    psd: sorry for my english.!

  • #28082

    Ignacio Gros
    Keymaster

    Hi, kike.

    That function is defined in nevow_glue.js

    The third parameter (evalAfterDone) is the name of the callback function. It’ll be executed when the action is finished.

    Please give us more details if you need any help. What would you like to do?

    • #28103

      kike
      Member

      Hi Ignacio!

      Thanks for your reply. Effectively in that file is the function.

      And what I try to do is that after filling the page with content, be it text, video, audio, etc., using a button can display a panel with a summary of the information that has been entered, just as some installers do , which show a summary after having chosen certain options.

      That is, I want to show a panel with a summary of what was done in the page, that summary I want to do per page, that is why I need to implement an event for the button where I can call a panel to show that information. Additionally, I need to take the information that I enter in each page to present the summary, for example the text entered in a text area.

  • #28107

    Ignacio Gros
    Keymaster

    Hi, kike.

    See the attachment. Add an iDevice and save it to see it work.

    The code is in Properties – Footer. It just displays an alert message when clicking on the “Done” icon.

    You can also include it in your Style, using the “edition-extra-head” tag in the config.xml file.

    Is that what you’re asking?

    Regards.

    Archivos adjuntos:
    You must be logged in to view attached files.
    • #28114

      kike
      Member

      Thank you Ignacio!

      Yes, I want something like you sent me, I have to show a new panel like the panel “about exe” with the information that I said. Just one more question, If I want to show what I wrote in iDevice-Textual Information- Free Text, how I obtain the information I wrote to show it in the alert?

      In the attached image, I show you what I want to do. I want a panel same as the image that shows what I did on the page.

      Sorry for my questions, I’m new working with exelearning!

      • This reply was modified Hace 7 años, 6 meses by  kike.
      Archivos adjuntos:
      You must be logged in to view attached files.
  • #28123

    Ignacio Gros
    Keymaster

    In the example:

    Go to Properties – Footer an type this:

    if (typeof(tinymce)!=’undefined’) alert(tinymce.activeEditor.getContent())

    Instead of:

    alert(“Example”)

    I hope it helps.

You must be logged in to reply to this topic.

Skip to content