1

Is it possible to change a html value permanently via javascript? I'm accessing a local file.

These are my codes:

function switchPic(){
  top.topPage.activeDef = top.topPage.document.getElementById('h1');
  top.topPage.activeDef.href = "pic2.html";

}

2 Answers 2

3

If by "permanently" you mean changing the HTML file (on the server), the answer is no, you cannot do that with client-side JavaScript.

Sign up to request clarification or add additional context in comments.

2 Comments

Same with a local file. Javascript is not allowed file-system access for security reasons.
@sholsinger: But then, how does TiddlyWiki do that? See tiddlywiki.com This works at least for local files.
0

No, this is not possible.

Javascript in the browser is insulated from the local file system (sandboxed) for security reasons.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.