Hi All,
The html page(see item a below) is calling javascript(item b below), but cant work as the page show blank. Not sure if the method of calling is wrong(in terms of default directory) or javascript is wrong.
using 127.0.0.1/htmlscript.html below to call the java script embedded in the following html script.
I am using apache server and apache server have error 304(not modified)
Been trying many methods for past 1 week...
Not sure where went wrong?
Thanks and Best Rgds,
Andrew
a) html page
=========
b) javascript
=========
The html page(see item a below) is calling javascript(item b below), but cant work as the page show blank. Not sure if the method of calling is wrong(in terms of default directory) or javascript is wrong.
using 127.0.0.1/htmlscript.html below to call the java script embedded in the following html script.
I am using apache server and apache server have error 304(not modified)
Been trying many methods for past 1 week...
Not sure where went wrong?
Thanks and Best Rgds,
Andrew
a) html page
=========
Code:
<html> <head> <SCRIPT LANGUAGE="JAVASCRIPT" SRC="j_pop4.js" TYPE="TEXT/JAVASCRIPT"> <!-- //--> </SCRIPT> </head> <body> </body> </html>
b) javascript
=========
Code:
<html> <head> <TITLE>Java Popup Window Example with size, title and background colour parameters</TITLE> <script language="JavaScript1.2" type="text/javascript"> <!-- ; var newwindow; var wheight = 0, wwidth = 0; function popitup5(url, title, iwidth, iheight, colour) { var pwidth, pheight; if ( !newwindow || newwindow.closed ) { pwidth=iwidth+30; pheight=iheight+30; newwindow=window.open('','htmlname','width=' + pwidth +',height=' +pheight + ',resizable=1,top=50,left=10'); wheight=iheight; wwidth=iwidth; } if (wheight!=iheight || wwidth!=iwidth ) { pwidth=iwidth+30; pheight=iheight+90; newwindow.resizeTo(pwidth, pheight); wheight=iheight; wwidth=iwidth; } newwindow.document.clear(); newwindow.focus(); newwindow.document.writeln('<html> <head> <title>' + title + '<\/title> <\/head> <body bgcolor= \"' + colour + '\"> <center>'); newwindow.document.writeln('<img src=' + url + ' title=\"' + title + '\" alt=\"' + title + '\" >'); newwindow.document.writeln('<\/center> <\/body> <\/html>'); newwindow.document.close(); newwindow.focus(); } // Routines to tidy up popup windows when page is left // Call with an onUnload="tidy5()" in body tag function tidy5() { if (newwindow && !newwindow.closed) { newwindow.close(); } } // Based on JavaScript provided by Peter Curtis at www.pcurtis.com --> </script> </head> <BODY onUnload="tidy5()" > <A HREF="javascript:popitup5('0002.jpg','Temple of Heavenly Bliss', 384, 288,'white')"><IMG SRC="0002.jpg" WIDTH="160" BORDER="0" HEIGHT="120" HSPACE="10" VSPACE="5" ALT="Temple of Heavenly Bliss" TITLE="Temple of Heavenly Bliss" ALIGN=left></A> </body> </html>
Comment