[an error occurred while processing this directive]
javascript tutorial graphic

Webteacher Software now offers

Type a message in the box,
it will become a link to close the new window.

You guessed it, here is the code
Look it over, then we'll break it on down


<!-- Beginning of JavaScript -

function MyWindow(message) {

//Define Date to display in local syntax
now = new Date();
LocalTime = now.toLocaleString();

//Define contents of page
'<body bgcolor="beige">'+
'Click on the message below to close this window<br>'+
'<A HREF="javascript:window.close()" >'+
message +

//Create new Window
options = "toolbar=0,status=0,menubar=0,scrollbars=0," +
newwindow=window.open("","mywindow", options);

// - End of JavaScript - -->

<BODY bgcolor="white" onLoad="this.form1.text1.focus()">

<TABLE BORDER=1 bgcolor="beige"><tr><td><B>Type a message in the box, <br>it will become a link to close the new window.</B>
<FORM NAME="form1">
<INPUT NAME="text1" TYPE=Text SIZE="50" MAXLENGTH="50"><br>
<INPUT TYPE=Button VALUE="Create my window" onClick="MyWindow(form.text1.value)">


Learn Methods

Home | WebData - Web Database Software | Javascript | CGI | Consulting | Map Builder | Contact Us | The Press Room