Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 232
  • Last Modified:

Hidden Window >> Prevent reloading data

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
graphicjunkie
Asked:
graphicjunkie
1 Solution
 
ZontarCommented:
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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now