jammer1221
Programmer
Hey all,
I have this code and it is not functioning correctly. I am a PHP developer and know almost no ASP. Either way, I'm trying to write some varibles to a javascript function that will be called once the page loads. The two varibles are when the page first loads and the size of the current page.
The code doesn't seem to be working. It says: /content/Inactive/Research_andamp_Development_-_MP/getSpeed2.asp, line 9
I would assume thats because it can't find getSpeed2.asp. Any help would be greatly appreciated.
Also, if there are any PHP & ASP developers out there here is my PHP code (simplified) that I was trying to convert to ASP...
Thanks,
Matt
I have this code and it is not functioning correctly. I am a PHP developer and know almost no ASP. Either way, I'm trying to write some varibles to a javascript function that will be called once the page loads. The two varibles are when the page first loads and the size of the current page.
Code:
<%
dim fs,f
function UDate(oldDate)
UDate = DateDiff("s", "01/01/1970 00:00:00", oldDate)
end function
set fs=Server.CreateObject("Scripting.FileSystemObject")
set f=fs.GetFile("getSpeed2.asp")
if (f.Size) then
%>
<body onLoad="tt(<%UDate(Now())%>,<% Response.Write f.Size %>">
<%
end if
set f=nothing
set fs=nothing
%>
The code doesn't seem to be working. It says: /content/Inactive/Research_andamp_Development_-_MP/getSpeed2.asp, line 9
I would assume thats because it can't find getSpeed2.asp. Any help would be greatly appreciated.
Also, if there are any PHP & ASP developers out there here is my PHP code (simplified) that I was trying to convert to ASP...
Code:
<?php
$filesize = filesize("getSpeed2.php");
echo "<body onLoad=\"tt(".$_SERVER["REQUEST_TIME"].",".$filesize.")\">"
?>
Thanks,
Matt