I'm trying to pot some basic Javascript games/scripts to the Pre and I've had a small bit of success, but I don't know how to handle pop-up notifications... I'm a complete noob when it comes to Javascript, but I know my way around basic HTML and CSS.

I'm currently porting a basic typing test and here is the section of the script that causes the pop-up notification to appear once the typing test is completed to display the results. How should I display the information in WebOS for the Pre and how do I actually implement the changes? Thanks!

Code:
function stopIt() {
dayTwo = new Date();
endType = dayTwo.getTime();
totalTime = ((endType - startType) / 1000)
spd = Math.round((word/totalTime) * 60)
if (document.theForm.typed.value == document.theForm.given.value) {
alert("\nYou typed a " + word + " word sentence in " 
+ totalTime + " seconds, a speed of about " + spd + " words per minute!")
}
else {
alert("You made an error, but typed at a speed of " + spd + " words per minute.")
   }
}
I'm guessing that alert causes the information to generate in a pop-up. It's not a full new window, but it's a context box that appears independent from the window. When I run the application on the Pre I don't get the pop up as it is currently coded and merely get nothing when I'm done with the test.