Re: File Creation

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: McKirahan (News_at_McKirahan.com)
Date: 06/03/04


Date: Thu, 03 Jun 2004 20:53:01 GMT


"Boby wilson" <anonymous@discussions.microsoft.com> wrote in message
news:65C8BED1-CB4D-4987-83A0-7690886FE656@microsoft.com...
> My problem is that:
> Set objFSO = CreateObject("Scripting.FileSystemObject")
> Set objFile = objFSO.CreateTextFile("C:\foldername\filename.txt")
>
>
> create automatcaly in the "C:" drive of the server and not on the c drive
of the client what i want to do

Try it in the following manner:

<html>
<head>
<title>CreateFile.htm</title>
<script type="text/vbscript">
Sub CreateFile()
    Const cTXT = "C:\temp\objFSO.txt"
    Set objFSO = CreateObject("Scripting.FileSystemObject")
    Set objCTF = objFSO.CreateTextFile(cTXT)
    Set objOTF = Nothing
    Set objFSO = Nothing
End Sub
</script>
</head>
<body onload="CreateFile()">
</body>
</html>

You will get a security dialog that states:

"An ActiveX control on this page might be unsafe to
 interact with other parts of the page. Do you want to
 allow this interaction?"



Relevant Pages

  • Re: code problem: Cant get mouse over class to work.
    ... An option, and often a very good one, is to create and post a cut-down 'test-case' page that demonstrates the issue in isolation. ... The FAQ for the group propos that no more than about 500 lines of code (combined HTML and scripts) should be posted, but most properly cut-down test cases can be created within that limit. ... Granted there are circumstances where a link is the only sensible option; interactions between multiple pages, when images are a significant part of the issue/context, etc. ... Fragments of code that are intended to interact with an HTML DOM, without any HTML for them to interact with will likely be beyond the effort threshold for actual testing. ...
    (comp.lang.javascript)
  • Re: Accessing Class Method
    ... They can't interact, because they'll never be able to see each other. ... If you want to accomplish an interaction using your current setup, ... public $html = new HTML; ... function method() { ...
    (comp.lang.php)
  • RE: Controlling the html
    ... Also if you're using NUnitASP you can interact with them more directly, ... "Andy Sutorius via DotNetMonster.com" wrote: ... Can you manipulate the html the grid outputs? ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: how to interact interactive html excel cell in javascript
    ... > Please tell me how to interact the cells in this html page through ... > javascript. ...
    (comp.lang.javascript)
  • Re: OT: Who looks forward to work?
    ... ability to read people will only get better if you interact with them. ... Practice makes perfect and all that. ... You could also stick your head in ... This assumes that said sociopath had bothered to get beyond their ...
    (uk.rec.motorcycles)