3

I need to store data from some forms in a single html file, and it must be without internet access and only in one file (the own html file of the forms).

The perfect solution would be jstorage but it doesn´t work in IE9 or IE8 without a web server, I was searching for a tiny web server i could include in the html file but it is impossible I think, because the solution must be invisible for the customer and all the tiny web server i found needs a installation or some kind of configuration...

I can not use cookies or some extra file, only the file with the forms.

Please someone could give me some help? At least i need a idea to find the solucion.

Thank you very much.

3
  • jstorage would save the data in the browser, not in the html file which may be an important distinction. FWIW "TiddlyWiki" can do this (self-modifying html). It used to be pretty seamless on most browsers but it seems that things have changed and it has to jump thru hoops en.wikipedia.org/wiki/TiddlyWiki#File_saving nowadays Commented May 15, 2013 at 13:20
  • HTML 5 local storage may be an option here. but depends on which browser you want to support. Commented May 15, 2013 at 14:08
  • Thank you very much for both answers. Alex, I think that TiddlyWiki is a useful tool, but I want something very concrete and this task is too complex for use TiddlyWiki, anyway thanks. Jack, I am trying to use HTML5 without any server and it works in every browser, except in Internet Explorer, is it normal? because I am going to get crazy, I don't know whether it is my fault or not. Commented May 21, 2013 at 10:27

2 Answers 2

1

If you're trying to create a single transportable HTML-like file with images, javascript, CSS, etc. all embedded as multiple "files" then you can try MHTML, which lets you store data of different MIME types in a single file.

It's been supported by IE for some time now, though from experience I can tell you it's somewhat clunky to store, view, and use the files. Generating MHTML programmatically is not too bad though. You basically just create a text file in the specified format and give it a .mht extension, which IE will recognize. URLs can be used to reference and label the different parts (say for including an image in an HTML part), and binary content is stored as base64 encoded text.

Microsoft has a decent example, showing an email message with embedded images, to get you started.

From: [email protected]
To: [email protected]
Subject: An example
Mime-Version: 1.0
Content-Base: http://server.example.com
Content-Type: Multipart/related; boundary="boundary-example-1";type=Text/HTML

--boundary-example-1
Content-Type: Text/HTML; charset=ISO-8859-1
Content-Transfer-Encoding: QUOTED-PRINTABLE

... text of the HTML document, which might contain a hyperlink
to the other body part, for example through a statement such as:
<IMG SRC="/images/image.gif" ALT="Image">
Example of a copyright sign encoded with Quoted-Printable: =A9
Example of a copyright sign mapped onto HTML markup: &#168;

--boundary-example-1
Content-Location: /images/image.gif
Content-Type: IMAGE/GIF
Content-Transfer-Encoding: BASE64

AAAFFDDlhGAGgAPEAAP/////ZRaCgoAAAACH+PUNvcHlyaWdodCAoQykgMTk5
NSBJRVRGLiBVbmF1dGhvcml6ZWQgZHVwbGljYXRpb24gcHJvaGliaXRlZC4A
etc...

--boundary-example-1 — 
Sign up to request clarification or add additional context in comments.

2 Comments

It is crazy, do you know some manual about this tool? does it work without a server? Thank you very much.
@Pau: MHTML is only a way of embedding multiple MIME types in a single HTML file. So it works without a server, but be sure to understand it won't magically let you modify anything about the file via the form; only store, say, and already filled in form and make it transportable. You could also look at Microsoft InfoPath if you're only concerned about Microsoft users. InfoPath lets you open/save/transport forms as XML files, but you might need some shared location to put the form template.
0

If by "without internet access", you mean developing locally, I think the best thing to do is to install a Program that will allow you to do so. XAMPP offers a great package of programs to assist you with that. From developing PHP files that work good with getting data from HTML forms. You can download XAMPP here: http://www.apachefriends.org/en/xampp-windows.html

Make sure to do some research on how to install XAMPP in order to develop locally, but I can promise you one thing. It's simple and easy to install and start working on...

1 Comment

Sorry, I meant without internet and without any server. Any way thank very much for your time.

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.