Purchase Solution

Dialog and Loop in JavaScript

Not what you're looking for?

Ask Custom Question

I have this file and I'm trying to Modify the display_alert() function to also display a line of the countdown on the web page.
i don't know how to add the function that calls the document.write() function so that it can pass the parameter variable as an argument to the document.write() function. I need it to write something after each alert. Can someone e please help? See below:

function display_alert (message){
window.alert(message); //
}
for (var count=1; count<14; count++) {

display_alert("Click ok to continue with the countdown.");
}
document.write("Ten<br/> Nine<br/> Eight<br/> Seven<br/> Six<br/> Five<br/> Four<br/> Three<br/> Two<br/> One<br/> Ignition Start<br/> Liftoff<br/> We have lift off!<br/> ");

Purchase this Solution

Solution Summary

Working example of a simple Web page (HTML) that iterates through JavaScript displayed messages stepped through by user interaction with a dialog. Attached as .html.

Solution Preview

Hello Student,

If I understand you correctly, this should be the direction you want to go (also attached as a ...

Purchase this Solution


Free BrainMass Quizzes
Javscript Basics

Quiz on basics of javascript programming language.

Basic UNIX commands

Use this quiz to check your knowledge of a few common UNIX commands. The quiz covers some of the most essential UNIX commands and their basic usage. If you can pass this quiz then you are clearly on your way to becoming an effective UNIX command line user.

Word 2010: Tables

Have you never worked with Tables in Word 2010? Maybe it has been a while since you have used a Table in Word and you need to brush up on your skills. Several keywords and popular options are discussed as you go through this quiz.

Inserting and deleting in a linked list

This quiz tests your understanding of how to insert and delete elements in a linked list. Understanding of the use of linked lists, and the related performance aspects, is an important fundamental skill of computer science data structures.

Basic Networking Questions

This quiz consists of some basic networking questions.