Solved

Hidden Window >> Prevent reloading data

Posted on 2003-11-13
1
224 Views
Last Modified: 2010-04-06
Hello and thanks for viewing my question!

I am creating a page that uses JavaScript to process information that is passed to me via a JSP. Therefore everytime the page reloads, the variables are read in. So in the case that the user changes a bunch of things in the page and hits reload, they lose all the changes because the values are read in again. I wanted to know if there is an easy/intelligent way to prevent this from happening. One idea I had was to create an invisible mother page which read the variables in from the JSP, and opens a child page that would contain the JavaScript for editing the values. The child page would get the values from the mother page and set the values to the mother page using the DOM "opener". That way if the child page is refreshed, the values are still loaded into the mother page and won't be re-read in. This technique would require the mother page to be invisible so that it could not be refreshed by the user. Can this be done? Is there a better way to accomplish this prevention of reloading the values when the page refreshes without using evil cookies? Thanks for your help!

-GJ

0
Comment
Question by:graphicjunkie
1 Comment
 
LVL 11

Accepted Solution

by:
Zontar earned 50 total points
ID: 9745809
Well, there's no way to make a window "invisible" and you can't make it any smaller than 150 by 150 px, IIRC. Although I'm generally not fond of framesets, one could be used here, with one frame having a height or width of 0 or 1px.

You could also store the data in one or more session variables.
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Preface This is the third article about the EE Collaborative Login Project. A Better Website Login System (http://www.experts-exchange.com/A_2902.html) introduces the Login System and shows how to implement a login page. The EE Collaborative Logiā€¦
JavaScript has plenty of pieces of code people often just copy/paste from somewhere but never quite fully understand. Self-Executing functions are just one good example that I'll try to demystify here.
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.

746 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

12 Experts available now in Live!

Get 1:1 Help Now