Jump to content

[SOLVED] Session variable without refresh?


Kane250

Recommended Posts

Hi,

 

I have a page with a form that saves the form data in a session variable, where it is recalled in a popup window. It carries over just fine, however it does not update until I refresh the popup window. Since the popup page submits to itself and echos text after submission, a javascript page reload script is not helping me since it makes the page bypass that part on the following reload. Anyone know what else I could do???

Link to comment
https://forums.phpfreaks.com/topic/123119-solved-session-variable-without-refresh/
Share on other sites

so you have 2 windows open (one with the form, and one as a pop-up) and you want session variables updated simultaneously in both?

 

if that is correct, you'll probably want to have one window refresh the other via javascript whenever an update is made.

 

this is what i do when i have a pop-up for an employee record. i make the update in the pop-up, click save, and the record is also updated in the window.opener.

They dont have to update in both. I'm basically carrying over an entered email address into the popup window, but it doesnt show up in the popup window until I reload it. However, the popup is a form that submits to the same popup, and after the submission I have text that reads something like "submission successful". If I use a javascript reload, the text never shows up because after it submits to itself, it refreshes again...bypassing the second part of the code...know what I mean?

Nevermind I fixed this. I just duplicated the popup page and renamed it. Then I added a JS reload once script into the original popup and had that popup submit to the second page instead of itself, which doesn;t contain the JS. This works great. Thanks for your suggestions!

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.