<HTML> <!-- ARCHIVE by FORTUNECITY.ws --> <HEAD> <TITLE>Assignment-3</TITLE> <SCRIPT LANGUAGE="JavaScript"> <!-- alert("Welcome to Assignment-3"); var newWindow; //declares variable for new window. function makeNewWindow() { //creates a new window and assigns this object to the //variable name, newWindow. newWindow = window.open("","","height=100, width=100") } function writeButton() { //writes a button on the new window page, //and replace it with a new image after the user //clicks the button. var newContent = "<HTML><HEAD><TITLE>New Window</TITLE>"; newContent+="<SCRIPT LANGUAGE='JavaScript'>"; newContent+="if(document.images){"; newContent+="buttonDown = new Image(50,50);"; newContent+="buttonDown.src = 'down.gif';}"; newContent+="else{"; newContent+="buttonDown = '';"; newContent+="document.button = '';}"; newContent+="</SCRIPT></HEAD>"; newContent+="<BODY ><script> (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); ga('create', 'UA-47423994-1', 'fortunecity.ws'); ga('send', 'pageview'); </script> <center> <br> <div> <script language="javascript" type="text/javascript" src="http://ad.broadcaststation.net/ads/show_ad.php?width=728&height=90"></script> </div> </center> <center> <br> <div style="height:5px"></div> </center> <CENTER>"; newContent+="<A HTML='#'"; newContent+="onClick = 'document.button.src=buttonDown.src;'>"; newContent+="<IMG SRC = 'up.gif' BORDER=0 NAME='button'" newContent+= "width = 50 height = 50></A>"; newContent += "</CENTER </BODY> <!-- ARCHIVE by FORTUNECITY.ws --> <center> <div> <br> <script language="javascript" type="text/javascript" src="http://ad.broadcaststation.net/ads/show_ad.php?width=300&height=250&cache=0"></script> <script language="javascript" type="text/javascript" src="http://ad.broadcaststation.net/ads/show_ad.php?width=300&height=250"></script> </div> <br> <br> </center> </HTML>"; newWindow.document.write(newContent); newWindow.document.close(); } function getBgColor(s) { //returns the option made by the user. return s.options[s.selectedIndex].value; } //--> </SCRIPT> </HEAD> <BODY onLoad="makeNewWindow()+writeButton()"><script> (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); ga('create', 'UA-47423994-1', 'fortunecity.ws'); ga('send', 'pageview'); </script> <center> <br> <div> <script language="javascript" type="text/javascript" src="http://ad.broadcaststation.net/ads/show_ad.php?width=728&height=90"></script> </div> </center> <P>Select a background color for the new window:</P> <FORM> <SELECT NAME="list" SIZE=1 onChange="newWindow.document.bgColor=getBgColor(form.list);"> <OPTION VALUE="#FFFFFF">Choose color</OPTION> <OPTION VALUE="#FF0000">Red</OPTION> <OPTION VALUE="#FFFF42">Yellow</OPTION> <OPTION VALUE="#00A5C6">Blue</OPTION> <OPTION VALUE="#FFFFFF">White</OPTION> <OPTION VALUE="#000000">Black</OPTION> <OPTION VALUE="#AD4A18">Brown</OPTION> <OPTION VALUE="#FF6342">Orange</OPTION> </SELECT> </FORM> </BODY> <!-- ARCHIVE by FORTUNECITY.ws --> <center> <div> <br> <script language="javascript" type="text/javascript" src="http://ad.broadcaststation.net/ads/show_ad.php?width=300&height=250&cache=0"></script> <script language="javascript" type="text/javascript" src="http://ad.broadcaststation.net/ads/show_ad.php?width=300&height=250"></script> </div> <br> <br> </center> </HTML>