Report, edit, etc...Posted by O)FaRTy1billion on 2005-11-07 at 18:29:37
Is there any way to load/save/write files with JavaScript or any other web script? And could it save the file onto your computer?
I would use VBScript, but I am trying to make what I am working on work with other browsers too.
Report, edit, etc...Posted by Doodle77(MM) on 2005-11-07 at 18:39:41
unless youre talking about server-side languages. I think that you cant(vbscript support is not universal). (Heeelp, i come so close to ending all my posts in this forum with ; ) EDIT: Unless that is, so long as you dont want to cookie your users to death.
Report, edit, etc...Posted by DT_Battlekruser on 2005-11-07 at 20:17:19
"Cookie to death" ROFL
Report, edit, etc...Posted by O)FaRTy1billion on 2005-11-07 at 20:57:09
I could make them download this and extract it... or I could put it on a server and run it. (Download would probably work best so it would not take 3 million years to download the page; but either way luckily I made all the text boxs and "popups" as hidden DIVs ;D)
Cookies would work for saving some stuff... but not exactly what I had in mind.
(Also what about Loading files? I have seen PHP do this.. but I don't know PHP..)
EDIT:
QUOTE(Doodle77 @ Nov 7 2005, 05:39 PM)
(vbscript support is not universal).
Ya, I already had a thing on why I wouldn't do that..
Report, edit, etc...Posted by BSTRhino on 2005-11-08 at 00:30:53
Yes, you can, you can use the FileSystemObject. I don't have enough time at the moment to show you, but search the web for windows script 5.6 documentation and it'll tell you more.
Report, edit, etc...Posted by O)FaRTy1billion on 2005-11-08 at 21:06:54
FSO is VB, and not everything supports VBS. (I thought only IE supports it..) And what if a Mac user wants to use what I am doing, do they support "windows script"?
Plus I am making this with javascript because I cannot use Visual Basics in actual programs at the moment, plus I have been extremely bored.
Report, edit, etc...Posted by BSTRhino on 2005-11-09 at 00:24:39
Oh, I see. No, the FileSystemObject is Windows only, and I think it only works in IE. It works in JavaScript (like with the MPQ Compactor) and it's not related to VB actually, I wish it was because it's so much neater than VB's file functions. At least, in my opinion heh...
If you want compatibility across all platforms, there's no built-in file-manipulation functions in JavaScript. You could try moving up to Java or Flash, but browsers will definitely have something to say if you were trying to access files on the user's hard drive directly.
Report, edit, etc...Posted by O)FaRTy1billion on 2005-11-09 at 17:41:05
FSO works with JavaScript??
I mean it loads a file they select..
HTML
<input type="file">
Maybe I could find a way to do enough PHP to do the loading and stuff..?
Isn't there a way to generate HTML pages on a website? (As in it makes a link and it says "Right click this link and click 'Save As'") I've seen that before..
Report, edit, etc...Posted by Doodle77(MM) on 2005-11-09 at 19:40:40
PHP, PHP and PHP. Just make an online version using PHP.
Report, edit, etc...Posted by O)FaRTy1billion on 2005-11-09 at 20:34:33
I do not know PHP, and its online using JavaScript (Well... it could be online.)
Report, edit, etc...Posted by RexyRex on 2005-11-12 at 23:09:26
Assuming the HTML has <input type="file" name="uploaded_content" />, the PHP is as follows.