darp Posted May 7, 2010 Share Posted May 7, 2010 I have code like this on a page that customers might want to refer to. <?php require('includes/application_top.php'); $display = "<table> <tr> <th>Suggestions</th>"; if ( $userinput == abc ) { $display .= "<td> <a href=\"javascript:eventWindow('first_suggestion.html');\"> <img style=\"border: none;\" src=\"/images/product.png\" alt=\"Click for some suggestions.\" width=\"360\" height=\"200\" />Click for suggestions</a> </td>"; } else { $display .= "<td> <a href=\"javascript:eventWindow('second_suggestion.html');\"> <img style=\"border: none;\" src=\"/images/other_product.png\" alt=\"Click for some suggestions.\" width=\"360\" height=\"200\" />Click for suggestions</a> </td>"; } $display .= "</tr> </table>"; echo $display; require(DIR_WS_INCLUDES . 'application_bottom.php'); ?> Will popping up the window break the session? The window is a small new window with no links that pops up over the main window. Users will read the information and close it, so is the session maintained by the main window? I tried $display .= "<td> <a href=\"javascript:eventWindow( . tep_href_link('first_item.html) . );\"> <img style=\"border: none;\" src=\"/images/product.png\" alt=\"Click for some suggestions.\" width=\"360\" height=\"200\" />Click for suggestions</a> </td>"; but the javascript does not work. Is there any way to get it to work within $display = " ";? Would something like this be dangerous or for that matter do anything? $user_session = tep_session_id($HTTP_GET_VARS[tep_session_name()]); <a href=\"javascript:eventWindow( . tep_href_link('first_item.html?osCSid=$user_session') . );\"> Link to comment Share on other sites More sharing options...
Jack_mcs Posted May 7, 2010 Share Posted May 7, 2010 Popups are safe to use - the session won't be lost. Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.