Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Do javascript popups break sessions?


darp

Recommended Posts

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

Archived

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

×
×
  • Create New...