SoFunction
Updated on 2025-04-13

Generate JS files with ASP+FSO

<!--#include file=""--> 
<% 
set js = ("") 
sql="select top 10 * from article order by id desc" 
set js =  (Sql) 
do while not  
    title=js("title") 
addate=js("addate") 
foolcat = foolcat + "<li><a href=""/"& js("id")&".htm"">" &title&" "&addate&"</a></li><br>"  
 
loop 
'Generate JS file
foolcat = "" + foolcat + "" 
foolcat = "('" & foolcat & "')" 
FolderPath = ("./") 
Set fso = ("") 
Set fout = (FolderPath&"\") 
 foolcat 
'Close the connection
 
set fout = nothing 
 
set js = nothing 
 
set conn=nothing 
%>