Win a copy of Head First Android this week in the Android forum!

Scott Dinwiddie

Greenhorn
+ Follow
since Aug 22, 2012
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Scott Dinwiddie

I'll dig into the signed applets topic and take that approach. Thanks Paul.


It's not teaching people to use Javascript to access local databases. It's removing the database aspect and EMULATING database transactions. A JS API is what will access the text file that will serve as a data repository on the localhost side so those learning only have to worry about coding the JS side and make calls to the API to read/write data in the text file. Just a workaround to separate the database 'layer' in order to focus on the JS code for database access. It's a step for beginners to get a handle on coding JS without having to deal with the actual database transactions, which is in the next level of classes.
9 years ago
Javascript cannot write to localhost files (txt file in this case). I can get it to perform the write to file using ActiveX (got it working in IE currently), however, I am trying to figure out how to achieve this for Firefox/Chrome since they don't recognize ActiveX objects. I am taking the approach of creating a Java applet/whatever that can be called from javascript and passed the data to write to the .txt file creating a window for local file writing for Javascript to work through in Firefox and Chrome. I suppose my question would be, what would be the most effective way to provide file write capabilities to Javascript? I am looking at using what I refer to as a "Java Stub" to achieve this for Chrome and Firefox since I can use an ActiveX object to do it in IE. Thank you.

Edit: I am aware that applets are sandboxed via the JVM, however, it has occurred to me to attempt to call the applet from Javascript passing the data to be written to the applet, then calling a local jar file from the applet and relaying the data to the local jar file in hopes of stepping out of the sandbox for the applet.

The end goal is to emulate database access with Javascript without requiring a database server and keeping on the localhost for learning purposes.
9 years ago
I am working on creating a Java stub to give write access via Javascript calls. I only need write access to a single text file that will serve as my data repository. This is going to be used to teach database interactivity through Javascript without requiring an SQL server or using the new HTML5 local database. Thank you for any assistance/suggestions.
9 years ago