Link to home
Start Free TrialLog in
Avatar of MaxOvrdrv2
MaxOvrdrv2

asked on

Transfer Data between pages without a web root/IIS?

Hi,

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)...

Thanks!

MaxOvrdrv2
Avatar of Ryan Chong
Ryan Chong
Flag of Singapore image

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.


http://en.wikipedia.org/wiki/Server-side_scripting

http://en.wikipedia.org/wiki/Database
Avatar of MaxOvrdrv2
MaxOvrdrv2

ASKER

Hi,

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?
Cookies come to mind, although the amount of info may be too restricting...
ASKER CERTIFIED SOLUTION
Avatar of Badotz
Badotz
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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!
No worries - glad to help. Not sure I deserve the title Genius, though...