<html> <head> <title>Sample Program Five</title> <script> // // This is using a function to achieve a set of steps together // Functions should always be put in the "heading" section of your program function whoname() // Functions begin with the key word function followed by a name and parentheses function // The actions of the function are initiated with the brace below. { // This function uses the prompt, document.write, and confirm we have already discussed // In addition, it opens a new window for more text. // var yourname=prompt("What is your name?","Vicki"); document.write("<h1><i>Welcome to the system " + yourname + "<br>"); confirm("Would you like to continue?") myWindow = window.open ("topper.html","UMSL"," location=no,toolbar=no,directories=no,menubar=no,status=no,scrollbars=yes,focus=yes,height=25,width=750") } //The actions of the function are stopped with the brace above. </script> </head><BODY TEXT="#000000" link="000000" VLINK="#000000" BACKGROUND="background.jpg"> <FONT FACE="ARIAL"> <form> <input type="button" value="continue" name="but1" onClick="whoname()"> </form> <H2><center><FONT COLOR="#551100"><FONT SIZE=+4> Welcome to the System!</FONT></FONT></H2></CENTER><br><p> <h1> This is some introductory text.</h1> <P><HR><P></center> <h5> <script> //Always begin your Javascript component with the key word script //Always document your programs! // This part of the program prints out the location where the page is actually put. where = document.location document.write('<i>URL:</i>' + where) // Always end your Javascript component with the ending key word </script> <dd>Page Owner: <a href="http://www.umsl.edu/~sauter/">Professor Sauter</a> (<a href="mailto:Vicki_Sauter@umsl.edu">Vicki.Sauter@umsl.edu</a>)<br> <dd><SCRIPT LANGUAGE = "JavaScript"> when = document.lastModified document.write("Last Modified: " + when) </script></dl> </body> </html>