Win a copy of Head First Android this week in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Al Hobbs
  • salvin francis

ActiveXObject, Save, Permission Denied

 
Ranch Hand
Posts: 239
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am getting permission denied error on Save...

- I need to open the file LOCALLY, and save with changes
- Even if the Warning message appears, I am ok.

Here is the code, a urgent help would be really appreciated...

**************
<script language="Javascript">
function create1() {
var file = document.location.href;

var myActiveXObject = new ActiveXObject("Scripting.FileSystemObject");
var xmldoc = new ActiveXObject("Microsoft.XMLDOM");
var boolVal=xmldoc.load(file);
var oNode = xmldoc.selectSingleNode("//*[@id='EmpName']");


oNode.getAttributeNode("value").nodeValue = document.all['EmpName'].value;
xmldoc.save(file);
document.location.reload(true);


</script>
Enter Name:<input type="text" id="EmpName" name="EmpName" value="sss"/>


**************

[ July 10, 2006: Message edited by: Andy Smith ]
[ July 10, 2006: Message edited by: Andy Smith ]
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Do you have the settings of the browser to let you do this?

Is the location alowed read write?

Eric
 
Andy Smith
Ranch Hand
Posts: 239
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
1. I am sorry Eric, but I am not able to find this option in the broswer, I am using IE,

2. Isn't this possible (Save), in default settings ?

3. If I am openiing a File from the local System, I guess it should not have permission probelem, Its not openeed from net...
 
reply
    Bookmark Topic Watch Topic
  • New Topic