Forum Discussion

SarahLichy's avatar
SarahLichy
Community Member
2 months ago

Coding in RISE

I went to CoPilot and typed in HTML code for frogs jumping. I go into RISE and upload under code- add code. When I insert, the block is blank.. Do you know why this is? Here's the code. 

 

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Jumping Frog</title>
  <style>
    body {
      background-color: #cceeff;
      display: flex;
      justify-content: center;
      align-items: center;
      height: 100vh;
    }

    .frog {
      width: 100px;
      position: relative;
      animation: jump 2s infinite;
    }

    @keyframes jump {
      0%   { top: 0; }
      50%  { top: -100px; }
      100% { top: 0; }
    }
  </style>
</head>
<body>
  https://upload.wikimedia.org/wikipedia/commons/6/62/Frog_icon.svg
</body>
</html>

6 Replies

  • Nedim's avatar
    Nedim
    Community Member

    It looks like the block appears blank in Rise because Rise doesn’t automatically show animation or external images when you just paste plain HTML text. You’ll need to make sure the frog image is inside an <img> tag (not just a link) and that your HTML includes both the <style> and <body> sections properly.

    For example, this version should work:

    <html lang="en">
    <head>
      <meta charset="UTF-8">
      <title>Jumping Frog</title>
      <style>
        body {
          background-color: #cceeff;
          display: flex;
          justify-content: center;
          align-items: center;
          height: 100vh;
        }
    
        .frog {
          width: 100px;
          position: relative;
          animation: jump 2s infinite;
        }
    
        @keyframes jump {
          0%   { top: 0; }
          50%  { top: -100px; }
          100% { top: 0; }
        }
      </style>
    </head>
    <body>
      <img 
        src="https://upload.wikimedia.org/wikipedia/commons/5/59/Flexbox_Froggy_%E2%80%93_Frog-green.svg" 
        alt="Jumping Frog Icon" 
        class="frog"
      >
    </body>
    </html>
    

    Suggestion:
    I believe the Discuss Articulate Products section would be a more appropriate place to get answers to product-specific questions. It's where members often go to find detailed solutions related to how the software works, and where those of us who regularly answer those types of questions spend more of our time. This section, on the other hand, is intended for general questions about eLearning.

  • SarahLichy's avatar
    SarahLichy
    Community Member

    This code is still showing up blank in my RISE course.  I just posted in the products channel. 

    • JudyNollet's avatar
      JudyNollet
      Super Hero

      If the issue is still going on, this post shouldn't be marked as SOLVED. The "Mark as Solution" option should be used to indicate which reply answers the question. If none do, then none should be marked as the solution. 

      • SarahLichy's avatar
        SarahLichy
        Community Member

        Sorry, I just marked as solved as I moved over into the products discussion forum. 

  • rashihonrao's avatar
    rashihonrao
    Community Member

    Hi, I have pasted my HTML code in my sample RISE course but when I add the 'complete block directly above' continue block, it doesnot work even when someone has given the wrong answre to the HTML quiz. I have added the window.parent.postMessage({ type: 'complete'}, '*') code and also set the completion requirements toggle on. 

  • rashihonrao's avatar
    rashihonrao
    Community Member

    this is an HTML quiz and the code is :

     

    <!DOCTYPE html> <html lang="en-GB"> <head> <meta charset="UTF-8"> <title>Early Warning Signs Scenario Quiz</title> <style> body { font-family: Arial, sans-serif; margin: 2em; } .scenario { margin-bottom: 2em; } .question { font-weight: bold; } .options label { display: block; margin-bottom: 0.5em; } .feedback { color: green; margin-top: 1em; display: none; } button { margin-top: 1em; } </style> </head> <body> <h1>Early Warning Signs Scenario Quiz</h1> <div class="scenario" id="scenario1"> <div class="question"> A client’s debtor days have increased from 60 to 120+ over the past year. The client says, “Don’t worry, we’ll collect soon.”<br> What should you do? </div> <form> <div class="options"> <label><input type="radio" name="q1" value="A"> Accept the explanation and do nothing</label> <label><input type="radio" name="q1" value="B"> Ask for a detailed ageing report and discuss collection strategies</label> <label><input type="radio" name="q1" value="C"> Increase their credit limit</label> <label><input type="radio" name="q1" value="D"> Ignore it until next review</label> </div> <button type="button" onclick="showFeedback()">Submit</button> <div class="feedback" id="feedback1"> <strong>Correct!</strong> The best action is to ask for a detailed ageing report and discuss collection strategies. </div> <div class="feedback" id="feedback1-wrong" style="color: red;"> <strong>Not quite.</strong> The best action is to ask for a detailed ageing report and discuss collection strategies. </div> </form> </div> <!-- You can duplicate the .scenario block above for each additional scenario --> <script> function showFeedback() { var radios = document.getElementsByName('q1'); var selected = ''; for (var i = 0; i < radios.length; i++) { if (radios[i].checked) { selected = radios[i].value; } } document.getElementById('feedback1').style.display = 'none'; document.getElementById('feedback1-wrong').style.display = 'none'; if (selected === 'B') { document.getElementById('feedback1').style.display = 'block'; } else if (selected) { document.getElementById('feedback1-wrong').style.display = 'block'; } } </script> </body> </html>