Hello, can javascript edit and read *.txt and *.ini files?
Announcement
Collapse
No announcement yet.
Can javascript edit and read *.txt ans *.ini files?
Collapse
X
-
Maybe...
I'm not sure if this would work, but try something like:
Code:<iframe id="j" src="WHATEVERTHING.txt(or)ini" HIDDEN="true"></iframe> <script> <!-- var it=document.getElementById('j').innerHTML; alert('It\'s '+it+' ') //--> </script>
Oh, was I supposed to put something here? ........
-
Now why would you want to do a thing like that?
Javascript cannot access or edit (= damage?) any file
on the user's system with the exception of cookies.
All the code given in this post has been tested and is intended to address the question asked.
Unless stated otherwise it is not just a demonstration.
Comment
-
Use PHP.David House - Perfect is achieved, not when there is nothing left to add, but when there is nothing left to take away. (Antoine de St. Exupery).
W3Schools | XHTML Validator | CSS Validator | Colours | Typography | HTML&CSS FAQ | Go get Mozilla Now | I blog!
Comment
-
Originally posted by Philip M
Now why would you want to do a thing like that?
Javascript cannot access or edit (= damage?) any file
on the user's system with the exception of cookies.Oh, was I supposed to put something here? ........
Comment
-
You can read (but not write) an HTML page out of an IFRAME, but it must be a complete HTML page - you can't use a text file and expect it to have a DOM."Why bother with accessibility? ... Because deep down you know that the web is attractive to people who aren't exactly like you." - Joe Clark
Comment
Comment