WS Evolution Posted June 30, 2004 Posted June 30, 2004 I have installed OSCommerce Affiliate, but I am having problems with the JavaScript popup elements of the contribution. I have also installed ?Simple template System? Which is the cause of these problems, however JavaScript popups work fine through the rest of my site, so it must be the way the affiliate creates the popups!. Basically when you click a link to a popup box all you get is a blank html template! Has anyone experience this problem and knows how to fix it? Or Would anyone know the most likely cause of the problem and their location. Javascript .. top of an afficate page!! <script language="javascript" src="includes/general.js"></script> <script language="javascript"><!-- function popupWindow(url) { window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,res izable=yes,copyhistory=no,width=450,height=150,screenX=150,screenY=150,top=150,le ft=150') } //--></script> Example of popup in code..... <?php echo '<a href="javascript:popupWindow(\'' . tep_href_link(FILENAME_AFFILIATE_HELP_1) . '\')">' . TEXT_SUMMARY_HELP . '</a>'; ?> here is the popup overide in the sts_display_output.php page... // Override if we need to show a pop-up window $scriptname = $_SERVER['PHP_SELF']; $scriptname = getenv('SCRIPT_NAME'); $scriptbasename = substr($scriptname, strrpos($scriptname, '/') + 1); // If script name contains "popup" then turn off templates and display the normal output // This is required to prevent display of standard page elements (header, footer, etc) from the template and allow javascript code to run properly if (strpos($scriptname, "popup") !== false) { $display_normal_output = 1; $display_template_output = 0; } Any help would be much appreciated Thanks, Gareth Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.