PDA

View Full Version : document.write problem?


localhoster
12-25-2002, 06:53 AM
<SCRIPT LANGUAGE="JavaScript">

var X="?ID=725d0f8d5b658c0f6cf0064a85dc4730";
X+="&server="+escape(SERVER);
X+="&date="+escape(new Date());
X+="&pagetitle="+escape(DOCUMENT.TITLE);
X+="&pageurl="+escape(WINDOW.DOCUMENT.URL);
X+="&referal="+escape(WINDOW.DOCUMENT.REFERRER);
X+="&navprog="+escape(NAVIGATOR.APPNAME);
X+="&navver="+escape(navigator.appVersion);
X+="&os="+navigator.platform;
X+="&res="+screen.width+"x"+screen.height;
X+="&colors="+screen.colorDepth;

DOCUMENT.WRITE('http://test.com/pages/site.php'+X+'');

</SCRIPT>


can you see anything wrong with the following code? it doesnt work?

when i call http://test.com/pages/site.php directly it works fine?

im stumped.... hrrrmmmm

localhoster
12-25-2002, 07:02 AM
hrrrmmm

mayby its the code from site.php thats causing the error?



Header("Content-type:image/gif");
$image = fread "http://test.com/image.gif", "r"), 1000000);
echo $image;

localhoster
12-25-2002, 07:15 AM
ok... there was an error in the site.php file but i still dont understand why i cant include site.php into a website as an image?

$image = fread(fopen("http://test.com/image.gif", "r"), 1000000);

localhoster
12-25-2002, 07:21 AM
sorry all.... i figured out my problem...

it is:

document.write
NOT
DOCUMENT.WRITE

:)