How to display a container in multiple forms


#1

The instructions were: “Put the buttons into a Container. Use Form2.appendChild(conButtons) to add the Container to whatever form is showing.”

  1. Using a dummy container, I tried the code: Form2.append_Child(CoIcons) in Form2 (Note the added ‘underline’ after “append”) and got an error message stating that it’s not a function.???
    (Note that the container (CoIcons) was in Form1)

  2. Where does the code for processing the buttons go?

Tom


#2
  1. Why did you add the underline after append? The name of the function really is appendChild:

https://www.w3schools.com/jsref/met_node_appendchild.asp

  1. It doesn’t matter where you put the code - the namespace for code is global. I would put it in whatever form you created CoIcons in.

#3

I added the underline because when you start coding the function, the example has an underline.


#4

Did I do that? In any case, appendChild() is correct.