Results 1 to 3 of 3

Hybrid View

  1. #1

    Default Pop up blocker blocking new window

    Hi, I have some code in my sidebox that when clicked should open a new window with information on the product of the page it is on. I have set it to target_blank and the pop up blocker is blocking it. I know that pop up blockers are meant to do that, but I have another piece of code with target_blank and the pop up blocker doesn't block it? I desperately need to get it to open in a new window if anybody could help me please? Here is a link to a product page on my site: http://www.drgreens.co.uk/Environmen...n-CO2-Analyser in the advice centre sidebox on the right, you will see the "Data Sheet" link that I am referring to. It is brought up by a piece of code in that sidebox which is:
    PHP Code:
    <?php
    /**
     * editable sidebox - allows a sidebox editable with the define pages editor to be added to your site
     *
     * @package templateSystem
     * @copyright 2007 Kuroi Web Design
      * @copyright Portions Copyright 2003-2007 Zen Cart Development Team
     * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
     * @version $Id: blank_sidebox.php 2007-08-10 kuroi $
     */
    $content '';
    $content .= '<div id="' str_replace('_''-'$box_id 'Content') . '" class="sideBoxContent">';
    $content file_get_contents($define_sidebox);
    $content .= '<div class="adbox">'.$extra_field .'</div>';
    $content .= '<div class="adbox">' .$current_categories_description_sub .'</div>' ;
    $content .= '<div class="adbox">'.$products_file_1_link '</div>' ;

      
    // this is where the content that you have via the Admin is pulled in.
    $content .= '</div>';
    ?>
    The link being $products_file_1_link. And that code pulls up the code in /includes/modules/pages/product_info/main_template_vars_product_type.php which is:
    PHP Code:
    /*
     * extract info from queries for use as template-variables:
     */
     
    $extra_field  $files->fields['extra_field'];
      
    $products_file_1_title $files->fields['file_1_title'];
      
    $products_file_2_title $files->fields['file_2_title'];
      
    $products_file_3_title $files->fields['file_3_title'];
      
    $products_file_4_title $files->fields['file_4_title'];
      
    $products_file_1       $files->fields['file_1'];
      
    $products_file_2       $files->fields['file_2'];
      
    $products_file_3       $files->fields['file_3'];
      
    $products_file_4       $files->fields['file_4'];
      
    $products_video       $files->fields['video'];
      
    $products_video_title $files->fields['video_title'];
    if (!empty(
    $products_video)) $products_video_link '<a href="javascript:popupWindow(\''.zen_href_link(FILENAME_FLASH).'&id='.$_GET[products_id]. '\') ">'$products_video_title '</a>';
      
      if (!empty(
    $products_file_1_title)) $products_file_1_link '<a href="' "product_extra_files/" $products_file_1 '"target="_blank">'$products_file_1_title '</a>';
      if (!empty(
    $products_file_2_title)) $products_file_2_link '<a href="' "product_extra_files/" $products_file_2 '">'$products_file_2_title '</a>';
      if (!empty(
    $products_file_3_title)) $products_file_3_link '<a href="' "product_extra_files/" $products_file_3 '">'$products_file_3_title '</a>';
       if (!empty(
    $products_file_4_title)) $products_file_4_link '<a href="' "product_extra_files/" $products_file_4 '">'$products_file_4_title '</a>'
    which is where the target=_blank reference is. Thanks

  2. #2

    Default Re: Pop up blocker blocking new window

    I've just tried changing the code so that the files go to the downloads folder to be opened/saved from there, as I assumed that the downloads folder might be coded so as to override the pop up blocker, but still no luck

  3. #3

    Default Re: Pop up blocker blocking new window

    I've managed to get it working now changed it to come from downloads folder and removed the target_blank reference and it seems to be working! Not sure how, but if anybody else has a problem like this I would recommend using the downloads folder because it seems to be set up to overcome this issue.

 

 

Similar Threads

  1. create a pop up window
    By trickobrien in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 8 Dec 2011, 11:20 PM
  2. Pop-up Window
    By UrbanFool in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 6 Mar 2008, 04:31 AM
  3. Gallery view of images in a pop up/new window
    By starrydesigns in forum Setting Up Categories, Products, Attributes
    Replies: 4
    Last Post: 29 Feb 2008, 05:20 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg