...

View Full Version : a little help ?



steveg
02-25-2003, 11:14 AM
OK, can anybody see anything wrong with the code below.

I need to pass through a value that is used as part of a filename and the text that I want this file to contain, its not working though.


<SCRIPT type="text/vbscript">
<!--
function sendalot(sess_id, texttosend)

dim filenamex

filenamex = "c:\" & trim(sess_id) & ".sal"

Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
Set objTS = objFSO.CreateTextFile(filenamex)
objTS.WriteLine(texttosend)
objTS.Close
Set objTS = Nothing
Set objFSO = Nothing

end function
-->
</SCRIPT>

I thought this would be straight forward but its causing me a few problems.

Thanks

Steve.

king443
02-25-2003, 03:27 PM
Hee Hee - I don't think you can have write access to the local harddisk using JavaScript...

steveg
02-25-2003, 03:30 PM
its not on the local hard disk its the hard disk on the server.

Anyway Ive got it working now. sort of.

Thanks

Steve.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum