I won’t play the scorm file using HTML or Javascript.
I uploaded my scorm file to SCORM CLOUD.
I tried with Verious Code, but I was not able to get a score or all the user information. How can I get some data using JQuery?
heare are my code :
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<iframe
src="https://app.cloud.scorm.com/sc/InvitationConfirmEmail?publicInvitationId=5f86e3fd-2375-45ea-ae9d-408c7d3ca54a"
width="100%" height="600px" frameborder="0"></iframe>
</body>
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<script src="SCORM_API_wrapper.js"></script>
<script>
$(document).ready(function () {
$('iframe').on('load', function () {
alert("Frame Loaded");
var scorm = pipwerks.SCORM; // Assuming you're using the pipwerks SCORM wrapper
var scormInitialized = scorm.init();
if (scormInitialized) {
alert("Intigrated");
} else {
alert("Faild");
}
});
});
</script>
</html>
I will have some data like this:
- user information
- score
- current page and prev page
I try with May code, but I am not getting proper output. I tried to implement the scorm API, but I failed. I am not getting anything.
First One :
<script>
$(document).ready(function () {
$('iframe').on('load', function () {
alert("Frame Loaded");
var scorm = pipwerks.SCORM; // Assuming you're using the pipwerks SCORM wrapper
var scormInitialized = scorm.init();
if (scormInitialized) {
alert("Intigrated");
} else {
alert("Faild");
}
});
});
</script>
Secound Try :
<script>
$(document).ready(function () {
$('iframe').on('load', function () {
alert("Frame Loaded");
var scorm = pipwerks.SCORM; // Assuming you're using the pipwerks SCORM wrapper
var scormInitialized = scorm.init();
if (scormInitialized) {
alert("Intigrated");
} else {
alert("Faild");
}
});
});
</script>
Harshad Koradiya is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.