Wrox Programmer Forums
|
Javascript How-To Ask your "How do I do this with Javascript?" questions here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Javascript How-To section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 17th, 2003, 08:18 PM
Friend of Wrox
 
Join Date: Nov 2003
Posts: 1,285
Thanks: 0
Thanked 2 Times in 2 Posts
Default Interact with files

Is JavaScript capable of creating, editing, reading or deleting files? I would like to have a button on my page that edits and saves a web page that is displayed on an iframe. I have everything except the JavaScript.

Thanks!:)

__________________
-Snib - http://www.snibworks.com
Where will you be in 100 years?
 
Old November 18th, 2003, 04:46 AM
joefawcett's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
Default

In general no, not unless the user has very low security settings. In some cases yes but not without the user being prompted. You can try and use the document.execCommand with the "saveas" command. See this link and look in methods.

http://msdn.microsoft.com/library/de...ence_entry.asp


--

Joe
 
Old November 19th, 2003, 01:33 PM
Friend of Wrox
 
Join Date: Nov 2003
Posts: 1,285
Thanks: 0
Thanked 2 Times in 2 Posts
Default

Hmm...

Alright, I got it working. But that prompt won't do. It needs to be totally automatic.

Is there another language that can do that without the prompt?

Thanks a lot! :)

 
Old November 19th, 2003, 01:51 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

The only way to get these kind of things done automatically (in Internet Explorer) is when you user has lowered security, or has added your site to the list of "Trusted Sites"

Sites in the Trusted Sites list have low security applied. Most "dangerous" actions are just allowed, for others a prompt will appear. It is possible to allow all actions (bypassing the prompt), but your users will have to set this manually.

Think of it, it would be too easy (and dangerous) to allow these kind of actions without a prompt. You visit my site, and I write out 2,000 text files in the root of your hard drive... Lots of fun.... not. ;)

Cheers,

Imar


---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
 
Old November 19th, 2003, 02:17 PM
Friend of Wrox
 
Join Date: Nov 2003
Posts: 1,285
Thanks: 0
Thanked 2 Times in 2 Posts
Default

I didn't realize what else could be done with those settings...

Ok then. The prompt will have to do.

Thanks for all the help!






Similar Threads
Thread Thread Starter Forum Replies Last Post
How to interact with data using ADO rohit_ghosh Access 1 May 21st, 2008 09:11 AM
How to interact with Biometric devices ? indiangeeks Pro PHP 1 March 7th, 2007 06:27 AM
NEWBIE - Interact with checkbox latieshajohnson Classic ASP Basics 3 December 19th, 2006 05:12 PM
2 different DBs.how they can interact to one anoth saif44 ASP.NET 2.0 Basics 1 March 2nd, 2006 06:32 AM
Loading Images & Interact with Outlook wasaan SQL Server ASP 1 August 4th, 2003 06:35 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.