Transfer Data between pages without a web root/IIS?

Posted on 2009-04-17
Last Modified: 2013-11-19

I would like to know if it's possible to keep session data alive, using JavaScript, if you don't have a framework/IIS running? Example, i am trying to create a small application for me and my wife on our laptop to calculate our budgets. I know i could do it in Excel but i felt like building something and since i've already got the programming skills, i thought, why not.

I started the project this morning and i'm stuck at the login screen, why? Funny enough, not at getting access to the DB file through the ActiveX object, but rather at getting the information to persist! Once my user is validated, i want to be able to have a session alive and check for that session on each page. After some searching, i found out that you cannot have sessions with JavaScript unless you use Cookies. No thanks. So instead, i thought: use the HTML form's GET method to post the data to the other page! Once again, no go... for some reason, GET doesn't post data when it's not being directed to a page with the "HTTP" context in front... why is that? i can connect and query a DB, but i can't post data between pages client-side?

But even in this case, the GET method would post the username and password and all of that within the URL... and even though it`s local, it's not something i would want... Considering that i created my own GET method which uses the window.location.href to post the new page and append all of the current page' form elements and that this is not something that i want to be using, is there a way for me to persist data between pages without cookies and without having to transform the URL manually because i'm not on a framework?

for example, the URL for my login is something like this:
C:\documents and settings\username\Desktop\login.htm
my script file handles the verification of the user against the DB without problems and should re-direct to the main page... but that page should check to see if the user is logged in (usually done through a session)...

Anyway, any help you could give me would be greatly appreciated... i will need a solution or just give up because as you can easily tell, i will need more of this to produce a proper Budgeting application (keep amounts in memory between pages, etc)...


Question by:MaxOvrdrv2
    LVL 48

    Expert Comment

    by:Ryan Chong
    You need a server side scripting language to be securely store your data and interact with database.

    javascript + ActiveX control is doable but personally I more suggest to have a server side scripting language + a database, which make more sense to me.
    LVL 10

    Author Comment


    I know that the best solution is to have this all server-side... unfortunately, i don't have a version of Windows at home that supports IIS, and i don't feel like setting up the thousands of addons to get JSP and Apache working... is there not a way to persist information using JavaScript? I can easily access my database already so i don't see why it would be so complicated to persist information using the same methods?
    LVL 29

    Expert Comment

    Cookies come to mind, although the amount of info may be too restricting...
    LVL 29

    Accepted Solution

    But if you can "easily access my database already", why not persist to the database?
    LVL 10

    Author Closing Comment

    haha! That's a great idea! you're a genius!! now why didn't i think of that?... hmmm... i must not be as smart as i hoped i was ;-)

    points to you my friend! I will simply create a "Session" table and store all my stuff in there! awesome! man seriously... simple as pie!

    thanks again!
    LVL 29

    Expert Comment

    No worries - glad to help. Not sure I deserve the title Genius, though...

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Join & Write a Comment

    Preface This is the third article about the EE Collaborative Login Project. A Better Website Login System ( introduces the Login System and shows how to implement a login page. The EE Collaborative Logi…
    JavaScript can be used in a browser to change parts of a webpage dynamically. It begins with the following pattern: If condition W is true, do thing X to target Y after event Z. Below are some tips and tricks to help you get started with JavaScript …
    The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…
    HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

    755 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    24 Experts available now in Live!

    Get 1:1 Help Now