A reasonable course of action one would think. But no, the do-gooders and politically correct anal morons will not stand for it. Spastics.
Code: <!DOCTYPE html> <html> <head> <meta charset="ISO-8859-1"> <title>Insert title here</title> </head> <body> <script type="text/javascript"> var conf = confirm("Fancy a bumming?"); if(conf==true) { document.write("Meet me tonight at Coocaddens underpass. 8 o'clock sharp."); } else { document.write("Chicken"); } </script> </body> </html> Save it as an html file and knock yourself out.
You get a bonus for yer HTML being HTML5 ready (although DOCTYPE should not be uppercase) You get a minus for yer Javascript using Java style bracing and indentation.
It opens a blank page with an immediate dialog box asking "Fancy a bummming?" I you click "Yes" then "Meet me tonight at Coocaddens underpass. 8 o'clock sharp." is written to the page, otherwise "Chicken" is written to the page.... ...oh, I see what you mean. I do have hairy arms.
I hate Java style bracing I've got Eclipse Luna installed on this machine. Luna is probably really old by now and I never really used it. For the very little Java I do I tend to use Notepad++ cos I can also do the little bash and perl scripting I do from time to time.