|
-
Dec 7th, 2001, 05:04 PM
#1
Thread Starter
Hyperactive Member
vbscript/server querstion
Ok, I know this:
Code:
<SCRIPT LANGUAGE="VBScript">
sub writeFile()
Dim fso, MyFile
Set fso = CreateObject("Scripting.FileSystemObject")
Set MyFile = fso.CreateTextFile("c:\file.txt", True)
MyFile.WriteLine("Hello world!")
MyFile.Close
set fso = nothing
end sub
writeFile()
MsgBox "Done!", vbOKONly
</script>
Saves on the client system, but how can I make my script save to the server's file? As well as read that file for later purposes??
Thanks
-Sac
-
Dec 8th, 2001, 01:10 AM
#2
PowerPoster
HI
Keep everything same except add a runat=server attribute in the script tag.
-
Dec 9th, 2001, 07:41 PM
#3
PowerPoster
The MSgBox part won't work though. No client side stuff can run at the server.
-----------------------------------------
-RJ
[email protected]
-----------------------------------------
-
Dec 12th, 2001, 10:36 AM
#4
Frenzied Member
Unless you have debugging enabled on the server in which it will allow msgbox to work (and stop the server until someone clicks the OK on the modal dialog).
oOOo--oOOo
__ /\/\onte96
oOOo--oOOo
Senior Programmer/Analyst
MCP
[email protected]
[email protected]
Your results may vary.. some restrictions may apply.. pricing and participation may vary.. not available in all states.. professional driver closed course..quantities limited..
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|