Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

I can\'t get these bullet points to output in my new window that I\'m creating w

ID: 3936802 • Letter: I

Question

I can't get these bullet points to output in my new window that I'm creating when I call the function.

Now when I click on bullet points, the information displays in the current window, I need it to display in a new window. Here is the javascript:

function bulletPoints(){ //outputting okay, just not in new webpage

   page += document.write("<ul><li>Unordered list item 1</li><li>Unordered list item 2</li><li>Unordered list item 3</li></ul>");

}

and here is the html:

<tr>
       <td> Entities</td>
       <td> Outputs bullet point text</td>
       <td> <button>bullet points</button></td>
   </tr>

Explanation / Answer

The solution for the above problem goes like:

<tr>
       <td> Entities</td>
       <td> Outputs bullet point text</td>
       <td> <button>bullet points</button></td>
   </tr>

//and in script tag we write:

<script>

function bulletPoints(){
   var newWindow=window.open(); //this create a new window and then adds the html there.
newWindow.document.write("<ul><li>Unordered list item 1</li><li>Unordered list item 2</li><li>Unordered list item 3</li></ul>");
}

</script>

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote