innerHTML is a way in code.org to insert html into your project similar to the way you can insert CSS using setStyle()

This is very useful for making things look better in you project and having better UI in your project. If you have an applab project that you want to submit in the LGM awards, you better read this article because @LGM_Productions graded Math Quest pretty harshly because it was bad UI.

To start, make a text area that covers the whole screen. Then, insert this into the text area (Robbed this from @LGM_Productions, sorry not sorry...)

"<div style='font-family: Franklin Gothic Medium, Hiragino Kaku Gothic Pro,system-ui,-apple-system,Arial,sans-serif; background-color: white; border-radius: 8px;'><h2 style='font-size: 15px; color:black;'><strong>{event.name}<strong></h2><br><p style='font-size: 12px;'>{event.info}</p><br><br><a href='{event.url}'><button style='border-radius: 8px;'>Open Link</button></a><br></div>"

After putting this into the text area copy and paste the following code

innerHTML("text_area1", getText("text_area1"))

As you can see, it makes a box with random stuff in it. But thats not the point. The point is that you can make things look really good and more organized. To learn what the hell I just made you type into the text are refer to Khan Academy's (Direct @ackvonhuelio reference) Basic HTML and CSS course for free!!!

Try copy and pasting the weird code in multiple times and BOOM, scrolling machine with boxes right there!!!

Basically, code.org takes the text inside the text area and runns it through HTML, after that, it is converted to p5.js and printed onto the screen.

    gZany well it's a good start although this is also how fullscreen is achieved with applab.... this makes it harder because if you don't label everything you want to keep track of in the program you'll be forced to inject it again with innerHTML, while it's "not that big of a deal" there are a bunch of sanitation that happens which pisses you off like for most it makes sense though it's dumb for other reasons, there is a fullscreen application that I'm currently working on which i may release soon, also this type of fullscreen has weird scaling issues which makes it harder for dynamic scaling rather than just hard coding it, otherwise it'll come out weird

    tldr; (anything within the tag of divApplab is editable)
    if you decide to make a full app this way you better be prepared for more responsibility with things going wrong

      Varrience This is true, Not only doing full screen but also the ability to bypass the notification that warns you that you are 'leaving code.org'. While this is a pain, it is very much worth it depending on what you are making.

        gZany oh you mean the anchor buttons you can make yea CDO did it that way so there's some user interaction rather than me just forcing you into a page you didn't want to open... although funnily enough you can flood someones directory if there signed in with a loop hole since it's the same domain (hasn't been released since it's obviously malicious)

          Varrience funnily enough you can flood someones directory if there signed in with a loop hole since it's the same domain

          :trol:

            gZany maybe I'll release that soon to.... who knows maybe if I'm bored enough to I'll fish it out

              HTML is boring. go find something better to do with your life.

              Awards

              • â’¸ 1 from gZany
                Comment: Says the person who uses sprite lab💀
              • â’¸ 1 from ackvonhuelio
                Comment: ur mom is boring
              • â’¸ 1 from Letti42
                Comment: you use python mate go take a shower
              • â’¸ 1 from Varrience
                Comment: There are worse things to be looking at than HTML.... some languages you couldn't even ask me to touch with a 10 foot pole
              • â’¸ 1 from DragonFireGames
                Comment: such as machine code or brainfuck
              • â’¸ 1 from gZany
              • â’¸ 1 from person
                Comment: Html stands for How To Meaningfully Live You should use html
              • â’¸ 1 from Aalie_oop
                Comment: BORING LIKE YOU
              • â’¸ 1 from [WUT] Adam
                Comment: I used HTML in literally everything I do
              • â’¸ 1 from Jibberjay
                Comment: Guess what the internet is made with?
              • â’¸ 1 from Phoenix
                Comment: Did I ask

                Letti42 as of now i think your the only one who does lucky you 😂

                Unrelated note, but when creating a tampermonkey script. It is super useful to use element.innerHTML and element.outerHTML with getElementById. I can easily manipulate the entire display that way.

                @gZany, I use sprite lab only cause it is not confusing.
                @ackvonhuelio, my mom is not boring
                @Letti42, HTML stands for HyperText Markup Language. This mean that HTML isn't even a programming language. Python on the other hand is a programming language and as of 2023, the most popular programming language with 27.99% of programs using it.
                @Varrience, ya I can agree with that
                @DragonFireGames, ya, those are programming languages I will not learn.

                  Captain_Jack_Sparrow
                  yuh huh

                  Varrience
                  you mean that 'this code is annoying' program?
                  also you can have a cdo page open itself without need of user confirmation and flood someone's browser which is pretty funny

                    Captain_Jack_Sparrow , ya, those are programming languages I will not learn.

                    It's literally javascript, its very useful to know how it works since it operates the whole internet. Plus that is what code.org uses.

                    JavaScript is big kid stuff sprite lab is just the watered down version

                      Captain_Jack_Sparrow HTML stands for HyperText Markup Language. This mean that HTML isn't even a programming language.

                      never did i say it wasn't. But HTML is still code. also you use sprite lab, don't think that counts as programming either

                      Captain_Jack_Sparrow mf what. Sure its a bit wordy but its simple, hella efficent, and a hell of a lot better than any alternatives

                      ackvonhuelio unfortunately "this program is annoying" no longer works due to save() probably being removed because of me.... to be fair though they should have seen that coming.... however i do agree and thats how you can make it more malicious.... however CDO has control over the content like that and can easily take down both projects if deemed inappropriate or against terms, such things like remix flooding can easily made if you know what your doing which could be arguably worse than crashing someones browser

                      Dang, but on the offhand, it is proof of it's irritating nature

                      Chat