are you talking about an alert window or a new browser window? and your code doesn't seem to have anything to do with either...
Try the tutorials, that's where I learned it. As for a new browser window, I don't exactly remember how.... here's some code that might help you.
//this will make an alert popup
alert("Type your message here")
//this will open a new window