Forum Moderators: coopster

Message Too Old, No Replies

Passing session variabes to a popup window

Transfering sessions to a popup window

         

don_dr

12:47 pm on Jul 30, 2008 (gmt 0)

10+ Year Member



Hi guys,

I am having a slight problem and i was wondering if anyone can help. I am trying to implement an application which enables the user modify certain details after login.

The thing is; i would like to use a popup window in the members area to do this, but i noticed that the session variables seem to disappear when the window is open. Am i doing something wrong?

This is how i open the popup window;

javascript code in the head section;
======================================

function MM_openBrWindow(theURL,winName,features) { //v2.0
window.open(theURL,winName,features);
}

Link in body section
=============================
<a href="javascript:;" class="mainlink" onclick="MM_openBrWindow('modify.php','','scrollbars=yes,resizable=no,width=600,height=750')">Modify Account Info</a>

Thanks.

eelixduppy

2:41 pm on Jul 30, 2008 (gmt 0)



Odds are the sessions variables haven't seen set yet. Did you try dumping the contents of the session arary to the browser:

echo '<pre>'; print_r($_SESSION); echo '</pre>';

See what's going on. Oh, and by the way, Welcome to WebmasterWorld! :)

dreamcatcher

9:47 am on Jul 31, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



These days its not practical to use standard js code for pop up windows as many browsers block popups and/or people have pop up blocking software. Try an alternative pop up window like Greybox. That might help you out.

dc