i have the following code ..witch will change the background off my page from files on my computer..but it opens a new window to do it .
Can it be made to change the background on the same window ??
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<script>
function display_image(i mage) {
myWindow = window.open("", "Preview", "toolbar=0,loca tion=0,director ies=0,status=0, menubar=0,scrol lbars=0,resizab le=1,copyhistor y=0,width=1024, height=768,targ et=_parent" );
myWindow.docume nt.open();
myWindow.docume nt.write("</HEAD><BODY BACKGROUND=" + image + "><center><br>< br><br>");
}
</script>
</HEAD>
<link href="style.css " rel="stylesheet " type="text/css" />
<center>
<BODY>
<table border="2" width="100%" height="100%">
<tr><td>
<form>
<p><input type="file" name="url"><br>
<input TYPE="button" VALUE="Wallpape r"
onClick="displa y_image("f ile:///"+document .forms[0].url.value)"> </p>
</form>
</td>
</tr>
</table>
</BODY>
</center>
</HTML>
Can it be made to change the background on the same window ??
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<script>
function display_image(i mage) {
myWindow = window.open("", "Preview", "toolbar=0,loca tion=0,director ies=0,status=0, menubar=0,scrol lbars=0,resizab le=1,copyhistor y=0,width=1024, height=768,targ et=_parent" );
myWindow.docume nt.open();
myWindow.docume nt.write("</HEAD><BODY BACKGROUND=" + image + "><center><br>< br><br>");
}
</script>
</HEAD>
<link href="style.css " rel="stylesheet " type="text/css" />
<center>
<BODY>
<table border="2" width="100%" height="100%">
<tr><td>
<form>
<p><input type="file" name="url"><br>
<input TYPE="button" VALUE="Wallpape r"
onClick="displa y_image("f ile:///"+document .forms[0].url.value)"> </p>
</form>
</td>
</tr>
</table>
</BODY>
</center>
</HTML>
Comment