Issue with Hotspot Image: Optional Properties Not Working Simultaneously

  • IMED
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
1 year 6 months ago #9385 by IMED
should I integrate this code:

javascript
Copier le code
$('#mep_1 audio').on('ended', function() {
x_navigateToPage(false, {type: 'linkID', ID: 'PG1713784570265'});
});
$('#mep_2 audio').on('ended', function() {
x_navigateToPage(false, {type: 'linkID', ID: 'PG1713789918321'});
});
into the Script Optional Properties of the Connectors > Hotspot Image Connector page?
Also, where exactly should I add the audio in the Hotspot Image Connector > Hotspot source?
Finally, how can I obtain the audio IDs?"

This formulation is clear and covers all your questions.

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

More
1 year 6 months ago #9386 by ronm
Sorry you'll have to read my instructions in that previous post (which included how to get the pageID's) and then work out and learn how to do it.
But yes the script obviously goes in the script optional property.

Xerte developer & trainer
e-learning & m-learning consultant
mitchellmedia.co.uk | xerteacademy.com | learningapps.co.uk
Note: Support here is voluntary and meant for users to support each other.
Need direct commercial support with Xerte? mitchellmedia.co.uk/contact/

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

  • IMED
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
1 year 6 months ago #9387 by IMED
Thank you, it’s done!

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

  • IMED
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
1 year 6 months ago #9388 by IMED
I followed the previous guidance and added this code:

javascript
Copier le code
$('#mep_0 audio').on('ended', function() {
x_navigateToPage(false, {type: 'linkID', ID: 'PG1735833799288'});
});
It worked perfectly: clicking on the hotspot plays the sound and navigates to the next page.

However, when I added a second hotspot with this code:

javascript
Copier le code
$('#mep_1 audio').on('ended', function() {
x_navigateToPage(false, {type: 'linkID', ID: 'PG1735834449672'});
});
the page stopped working entirely. Could you help me identify the issue? Thank you!

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

More
1 year 6 months ago #9389 by ronm
If the page has stopped working entirely you probably have a syntax error.
Use the browser console to debug that and try carefully adding the code for each hotspot then testing and adding the next and so on.

Xerte developer & trainer
e-learning & m-learning consultant
mitchellmedia.co.uk | xerteacademy.com | learningapps.co.uk
Note: Support here is voluntary and meant for users to support each other.
Need direct commercial support with Xerte? mitchellmedia.co.uk/contact/
The following user(s) said Thank You: IMED

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

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