Kane250 Posted September 7, 2008 Share Posted September 7, 2008 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 More sharing options...
BlueSkyIS Posted September 7, 2008 Share Posted September 7, 2008 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. Link to comment https://forums.phpfreaks.com/topic/123119-solved-session-variable-without-refresh/#findComment-635824 Share on other sites More sharing options...
Kane250 Posted September 7, 2008 Author Share Posted September 7, 2008 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? Link to comment https://forums.phpfreaks.com/topic/123119-solved-session-variable-without-refresh/#findComment-635828 Share on other sites More sharing options...
Kane250 Posted September 7, 2008 Author Share Posted September 7, 2008 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! Link to comment https://forums.phpfreaks.com/topic/123119-solved-session-variable-without-refresh/#findComment-635839 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.