Hello all,
If I use a "typical" href - No problems I see the session value being passed to the page (populating a form field). Using the pop up link not surprisingly nothing gets passed.
My lack of experience is letting me down here.
Any solutions or an alternative ?

I'm getting the current page URL with this -

function testmy_currenturl() { 
   $str = empty($_SERVER["HTTPS"]) ? '' : ($_SERVER["HTTPS"] == "on") ? "s" : ""; 
   $test_proto = strleft(strtolower($_SERVER["SERVER_PROTOCOL"]), "/").$str;
	 $test_port = ($_SERVER["SERVER_PORT"] == "80") ? "" : (":".$_SERVER["SERVER_PORT"]); 
   return $test_proto."://".$_SERVER['SERVER_NAME'].$test_port.$_SERVER['REQUEST_URI'];

function strleft($s1, $s2) { 
	return substr($s1, 0, strpos($s1, $s2));


echo 'The content of $_SESSION[\'sess_var\'] is '
        .$_SESSION['url'].'<br />';

No issues there.
Using this JS for a pop up window -

<script language="JavaScript">

function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=1,scrollbars=1,location=1,statusbar=1,menubar=1,resizable=1,width=500,height=500');");



<p><a href="javascript:popUp('http://www.somesite/somepage.php')" />Tell a Friend</a></p>

My apologies - This is NOT a JS issue.
I made an assumption here. :$
Problem solved with this -

<p><a href="javascript:popUp('somepage.php')" />Tell a Friend</a></p>
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.