Jump to content

Writing A Txt File.


MasterPrime

Recommended Posts

First, an explanation of what I'm attempting to do.I work at a call center doing tech support and I'm trying to create a case tracking tool that is 100% local (based out of the user's net share).I have a framed HTML with one side being a simple form to fill out (case number, case comments) and the other side an iframe that displays a txt file.how do I get that information into a text file on the local computer?I've tried vb script:This creates an error Set objFSO = CreateObject("Scripting.FileSystemObject")HTA

<html><head><title>Test</title><HTA:APPLICATIONID="objTest"APPLICATIONNAME="My Application Name"SCROLL="yes"SINGLEINSTANCE="no"CONTEXTMENU="no"ICON="include path to favicon here"/></head><script LANGUAGE="VBScript">Sub SaveTextstrText = DataArea.ValueSet objFSO = CreateObject("Scripting.FileSystemObject")strFileName = "G:\Garcia, Jon\html\test" & SaveName.ValueSet objFile = objFSO.CreateTextFile(strFileName)objFile.Write strTextobjFile.CloseEnd Sub</SCRIPT><body><textarea name="DataArea" rows=5 cols=70></textarea><p>Enter File Name For Note: <input type="text" name="SaveName" value="*.txt"><input id=runbutton type="button" value="Save" name="run_button" onClick="SaveText"><p><p><BR><P></body></html>

I've tried AJAX: http://www.w3schools.com/ajax/tryit.asp?fi...httprequest_js1and I've tried a few failed scripts I found on the google machine.any other ideas? We are working on a bigger tool that will do all that stuff inside the program but that's about 6 months away. Until then I need my agents to be able to track cases locally and would prefer they didn't use scratch paper as that information gets lost easily.thanks in advance.

Link to comment
Share on other sites

You don't really have a way to create local storage. Flash movies can save to local storage, but you can't control where, it saves everything deep inside the user's application data directory somewhere. But just regular client-side scripting doesn't have permission to create local files, you'll probably need to use a server-side language like PHP or ASP to keep track of that data, which would save everything on the server instead of the user's local computer.

Link to comment
Share on other sites

You don't really have a way to create local storage. Flash movies can save to local storage, but you can't control where, it saves everything deep inside the user's application data directory somewhere. But just regular client-side scripting doesn't have permission to create local files, you'll probably need to use a server-side language like PHP or ASP to keep track of that data, which would save everything on the server instead of the user's local computer.
I don't want the data tracked. I just want the data written to a txt file and then displayed in a second frame. It's just so the agents can keep track of cases and people they might need to call back without putting them on paper. we've had a lot of angry customers who never got a callback because the agent lost the number.simply speaking, I need to write a text file in a specific location from the browser. Is that at all possible?
Link to comment
Share on other sites

It might be possible if you're able to set the security settings on the browser to allow that type of thing, with the default permissions it's not possible to create a file on the user's computer. You can also create something like an ActiveX applet that would be able to do that, which would only run in IE and might still require changing security settings.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...