The place for more technical questions for those who want to create new pagetypes or bespoke functionality.

Fancy popup

  • JaapJan
  • Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
12 years 5 months ago #1204 by JaapJan
Fancy popup was created by JaapJan
On the Xerte site i saw a nice (ajax?) popup when I tried tot open the pythagoras module. www.xerte.org.uk/index.php?lang=en&Itemid=702

I'm trying to make such a popup in xerte by embedding a code to a page. In this popup I want to display a text which is a kind of help text that can be used to anser a question.

Does anyone know the code for that?

Thanks.

Holy cow!

Please Log in or Create an account to join the conversation.

  • ingdon
  • Offline
  • Administrator
  • Administrator
  • Hi, my name is Inge. I'm an e-learning advisor.
More
12 years 5 months ago #1206 by ingdon
Replied by ingdon on topic Fancy popup
Hi JaapJan,

There is a possibility in Xerte to use the pagetype New Window. Is that something that you could use? The fancy popup at the Xerte community website is a popup in Joomla (another program).

If you use the New Window page you can link it to a file in the Media and Quota folder in your Xerte module. Please use the intern link otherwise when you replace the learning objecte you have to add the link again.

For example: FileLocation + 'media/NAME_FILE.EXT'

There are other possibilities as well. You can use a link to a help text. You can add this on the frontpage from you module and you can acces this helpfile (on the bottom) anywhere in your module.

There is also the possibility of using the glossary (woordenlijst). You can also add this on the front-page of your module.


Bye,
Inge

DLearning
I.Donkervoort
www.dlearning.nl

Please Log in or Create an account to join the conversation.

  • JaapJan
  • Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
12 years 5 months ago - 12 years 5 months ago #1207 by JaapJan
Replied by JaapJan on topic Fancy popup
Inge, thanks,

I'm more looking for a kind of popup that is generated by the 'automatic-linking-to-the-glossary-thing' :)
Is it possible to use such a code for a new textfield (and a small graphic)?
That is much better than a new window.

Cheers

JaapJan

Holy cow!
Last edit: 12 years 5 months ago by JaapJan.

Please Log in or Create an account to join the conversation.

  • ingdon
  • Offline
  • Administrator
  • Administrator
  • Hi, my name is Inge. I'm an e-learning advisor.
More
12 years 5 months ago #1208 by ingdon
Replied by ingdon on topic Fancy popup
Hi JaapJan,

For the time being you can use html in the glossary and add an images (and/or sounds) this way. It's already on the list that 'someday' you can create the glossary using a WYSIWYG editor.

Bye,
Inge

DLearning
I.Donkervoort
www.dlearning.nl

Please Log in or Create an account to join the conversation.

  • JaapJan
  • Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
12 years 5 months ago #1247 by JaapJan
Replied by JaapJan on topic Fancy popup
Inge, thanks for your answer

That's not what I need. I'm looking for a way to make a link in a text. Clicking this link have to open a popup with text and even an image. So: no glossary. Is there a simple javascriptcode or ajax-thing? I can not find it, except a simple HTML-popup.

Holy cow!

Please Log in or Create an account to join the conversation.

More
12 years 5 months ago - 12 years 5 months ago #1275 by JohnSmith
Replied by JohnSmith on topic Fancy popup
Something like this?



Create a new blank "Plain Text" page and insert this code. The <script> part all has to be on same line (it won't work if you reformat)

<a href="" onclick="my_dialog();return false;">Click here</a>
<script>x_dialogInfo.push({"built": false, "type": "my_dialog1"});function my_dialog(){x_openDialog("my_dialog1", "My Dialog 1 Title", "Close", "description", "Hello");};</script>

Each dialog you create will need a unique id, "my_dialog1" above....

John
Attachments:
Last edit: 12 years 5 months ago by JohnSmith. Reason: to make more sense...

Please Log in or Create an account to join the conversation.

Moderators: JohnSmith
Time to create page: 0.188 seconds
Copyright © 2026 The Xerte Project.
Xerte logo Apereo logo OSI Logo